0% found this document useful (0 votes)
36 views6 pages

Advanced Operating System CSN-502: Design Issues (Distributed OS) Issue 1: Time in Distributed Systems

This document discusses several key issues in distributed operating systems, including ordering events without a global clock, capturing global system state, and mutual exclusion. It specifically focuses on Lamport's logical clocks for ordering events in a distributed system. Logical clocks assign timestamps to events, with the rule that if event a happens before b, a will have a lower timestamp than b. This establishes a partial causal ordering of events.

Uploaded by

ishugupta0298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views6 pages

Advanced Operating System CSN-502: Design Issues (Distributed OS) Issue 1: Time in Distributed Systems

This document discusses several key issues in distributed operating systems, including ordering events without a global clock, capturing global system state, and mutual exclusion. It specifically focuses on Lamport's logical clocks for ordering events in a distributed system. Logical clocks assign timestamps to events, with the rule that if event a happens before b, a will have a lower timestamp than b. This establishes a partial causal ordering of events.

Uploaded by

ishugupta0298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

8/1/2023

Advanced Operating System


CSN-502

Design Issues (Distributed OS)


Issue 1: Time in Distributed Systems

Some Fundamental Problems

 Ordering events in the absence of a global clock


 Capturing the global state
 Mutual exclusion
 Leader election
 Clock synchronization
 Termination detection
 Agreement protocols

1
8/1/2023

Notion of Global Time

• Absence of Global Clock (Time)


 Assume a common clock
 Synchronize physical clocks

Absence of Global Time


 Scheduling processes (temporal order)
 Collecting up-to-date information on the state
of the system

Absence of shared memory


 A process in a distributed system can obtain a
coherent but partial view of the system or a
complete but incoherent view of the system

2
8/1/2023

Ordering of Events
Lamport’s Happened Before relationship:
For two events a and b, a → b if
a and b are events in the same process and a
occurred before b
a is a send event of a message m and b is the
corresponding receive event at the destination
process
a → c and c → b for some event c

3
8/1/2023

a → b implies a is a potential cause of b


Causal ordering : potential dependencies
“Happened Before” relationship causally orders
events
•If a → b, then a causally affects b
Concurrent events ( a || b)
•If a → b and b → a, then a and b are concurrent
For any two events in a system
•Either a → b, b → a or a || b

Lamport’s Logical Clocks


Each process i keeps a clock Ci.
 Each event a in i is timestamped Ci(a), the value
of Ci when a occurred
 Ci is incremented by d (d > 0) for each event in i
 In addition, if a is a send of message m from
process i to j, then on receive of m,
Cj = max(Cj, Ci(a)+d) //updated value of Cj

4
8/1/2023

Conditions satisfied by the system of clocks


 if a → b, then C(a) < C(b)
 For any two events a and b in a process i, if a occurs
before b then Ci(a) < Ci(b)
 If a is sending of a message m in i and b is receiving
of m at process j, then Ci(a) < Cj(b)
 → is an irreflexive partial order
 Total ordering (=>) possible by arbitrarily ordering
concurrent events by process numbers

5
8/1/2023

Limitation of Lamport’s Clock


a → b implies C(a) < C(b)
BUT
C(a) < C(b) doesn’t imply a → b !!
So not a true clock !!

You might also like