Professional Documents
Culture Documents
INtroduction To Distributed Systems
INtroduction To Distributed Systems
• Processes in a distributed system exchange information over the communication channel, the
message delay is unpredictable.
Distributed processes cannot rely on having an accurate view of global state, due to physical properties
of a clock and also due to transmission delays. Effectively, we cannot talk meaningfully about global state.
The traditional notions of "time" and "state" do not work in distributed systems. We need to develop
some concepts that are corresponding to "time" and "state" in a uniprocessor system.
Logical clocks
• the "time" concept in distributed systems -- used to order events in a distributed system.
• assumption:
o sending a message is one event (send event), receiving a message is one event(receive
event).
• The events in a distributed system are not total chaos. Under some conditions, it is possible to
ascertain the order of the events. Logical clocks try to catch this.
A -> B if A and B are within the same process (same sequential thread of control) and A occurred before
B.
A -> B if A is the event of sending a message M in one process and B is the event of receiving M by
another process
if A -> B and B -> C then A -> C
But the opposite is not true, C(a) < C(b) does not imply a -> b
That is, the ordering we get from Lamport's clocks is not enough to guarantee that if two events
precede one another in the ordering relation they are also causally related. The following Vector
Clock scheme is intended to improve on this.
Vector Clocks
• Clock values are vectors
• Vector length is n, the number of processes
• Ci[i](a) = local time of Pi at event a
• Ci[j](a) = time Cj[j](b) of last event b at Pj that is known to happen before local event a
Causal Ordering