Unformatted text preview: This can appear to be a deadlock! At various points, p2 waits for p1; p1 waits for p3; p3 waits for p2. How can we tell what is live? (Need a consistent snapshot.) A bit of notation: happened before: a-‐>b [b could be caused by a] 1) if a and b are in same process, a before b 2) send before receive 3) transitivity We can use this to build a logical clock, C. Cj is the value of clock C for process j such that if “a happened before b” then C(a) < C(b) [note I haven’t defined < ] sidebar on PL operator redefinition, aka C++ can refine [ IR1: increment on every event within a process IR2: put current timestamp in each message; on receipt, Cj = max(current, message + 1) What is the logical clock for the example above? (assign timestamps to each event.) Counter just keeps going up; ok if multiple (concurrent) processes have a different idea of the current time. If we define a tiebreaking rule, then we get a total order consistent with partial order. We can then use this to build workable distribut...
View Full Document
This document was uploaded on 04/04/2014.
- Spring '14