{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

TimeandGlobalStatesTanenbaum1108

# TimeandGlobalStatesTanenbaum1108 - Time and Global States...

This preview shows pages 1–8. Sign up to view the full content.

Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
November 2, 2005ECEN5053 SW Eng of Distributed Systems, Time and 2 Topics Clock synchronization Logical clocks Vector timestamps Global State
November 2, 2005ECEN5053 SW Eng of Distributed Systems, Time and 3 Vector Timestamps With Lamport logical clocks, nothing can be said about the relationship between a and b simply by comparing their timestamps C( a ) and C( b ). Just because C( a ) < C( b ), doesn’t mean a happened before b (remember concurrent events) Consider network news where processes post articles and react to posted articles Postings are multicast to all members Want reactions delivered after associated postings

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
November 2, 2005ECEN5053 SW Eng of Distributed Systems, Time and 4 Will totally-ordered multicasting work? That scheme does not mean that if msg B is delivered after msg A, B is a reaction to msg A. They may be completely independent. What’s missing? If causal relationships are maintained within a group of processes, then receipt of a reaction to an article should always follow the receipt of the article . If two items are independent , their order of delivery should not matter at all
November 2, 2005ECEN5053 SW Eng of Distributed Systems, Time and 5 Vector Timestamps capture causality VT( a) < VT(b) means event a causally precedes event b. Let each process Pi maintain vector Vi such that V i [i] is the number of events that have occurred so far at P i If V i [j] = x then P i knows that x events have occurred at P j We increment V i [i] at the occurrence of each new event that happens at process P i Piggyback vectors with msgs that are sent. When P i sends msg m, it sends its current vector along as a timestamp vt.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
November 2, 2005ECEN5053 SW Eng of Distributed Systems, Time and 6 For example P 1 V 1 = [3,1,2] P 2 V 2 = [2,4,1] P 3 V 3 = [0,2,5] With a new event at P 2 , V 2 [2] = V 2 [2] + 1 If P3 receives a msg a from P1, V 3 [1] = vt(a)[1] + 1 where vt(a) = V 1
November 2, 2005ECEN5053 SW Eng of Distributed Systems, Time and 7 Receiver thus learns the number of events that have occurred at P i Receiver is also told how many events at other processes have taken place before P i sent message m.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}