Chandy - Lamport Flashcards
What is the purpose of Chandy and Lamport’s algorithm?
Snapshot’ algorithm for determining global states of a distribued system:
Records a set of process and channel states (a snapshot) such that the recorded global state of each snapshot is consistent
What is the essential idea of the algorithm?
Each process records (a) its state and (b) for each incoming channel a set of messages sent to it.
If pi has sent message m to pj before recording its state, but pj has not received it, what does m account to?
we account for m as belonging to the state of the channel between them
How does the algorithm start?
Algorithm kicks-off by a process acting as though it has received a marker
over a non-existent channel (invoke marker receiving rule)
Name the two algorithm rules.
receiving and sending
State the receiving part of the algorithm
Marker receiving rule for process pi
- On pi’s receipt of a marker message over channel c:
- 1 if (pi has not yet recorded its state) it :
- 1.1 records its process state;
- 1.2 records the state of c as the empty set;
- 1.3 turns on recording of messages arriving over other incoming channels;
- 2 else
- 2.1 pi records the state of c as the set of messages it has received over c since it saved its state.
- 3 end if
State the sending part of the algorithm
After pi has recorded its state, for each outgoing channel c:
pi sends one marker message over c
(before it sends any other message over c).
What assertions does the Snapshot algorithm allow?
Snapshot algorithm captures consistent global state and allows assertions about whether stable predicates hold in the actual execution