1 / 11

Another example of distributed snapshot: Communicating State Machines

Another example of distributed snapshot: Communicating State Machines. Something unusual. Let machine i start Chandy-lamport snapshot before it has sent M along ch1 . Also, let machine j receive the marker after it sends out M ’ along ch2 . Observe that the snapshot state is

igor-hester
Download Presentation

Another example of distributed snapshot: Communicating State Machines

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Another example of distributed snapshot: Communicating State Machines

  2. Something unusual Let machine i start Chandy-lamport snapshot before it has sent M along ch1. Also, let machine j receive the marker after it sends out M’ along ch2. Observe that the snapshot state is down  up M’ Doesn’t this appear strange? This state was never reached during the computation!

  3. Understanding snapshot

  4. Understanding snapshot The observed state is a feasible state that is reachable from the initial configuration. It may not actually be visited during a specific execution. The final state of the original computation is always reachable from the observed state.

  5. Discussions What good is a snapshot if that state has never been visited by the system? - It is relevant for the detection of stable predicates. - Useful for checkpointing.

  6. Discussions What if the channels are not FIFO? Study how Lai-Yang algorithm works. It does not use any marker LY1. The initiator records its own state. When it needs to send a message m to another process, it sends a message (m, red). LY2. When a process receives a message (m, red), it records its state if it has not already done so, and then accepts the message m. Question 1. Why will it work? Question 1 Are there any limitations of this approach?

  7. Questions Distributed snapshot = distributed read. Distributed reset = distributed write How difficult is distributed reset?

  8. Global state collection Some applications - computing network topology - termination detection - deadlock detection Chandy Lamport algorithm does a partial job. Each process collects a fragment of the global state, but these pieces have to be stitched together to form a global state.

  9. Once the pieces of a consistent global state become available, consider collecting the global state via all-to-all broadcast At the end, each process will compute a set V, where V= {s(i): 0 ≤ i ≤ N-1 } A simple exercise s(i) s(j) i j s(k) s(l) k l

  10. Program broadcast (for process i} define V.i, W.i : set of values; initially V.i={s(i)}, W.i =  andevery channel is empty do V.i ≠ W.i send (V.i \ W.i) to every outgoing channel; W.i := V.i  ¬ empty (k, i) receive X from channel(k, i); V.i := V.i  X od All-to-all broadcast Assume that the topology is strongly connected graph V.i W.i V.k W.k (i,k) Acts like a “pump”

  11. Lemma. empty (i. k) W.i V.k. (Upon termination) i: V.i = W.i, and all channels are empty. So, V.i  V.k. On a cyclic path, V.i = V.k must be true. Since s(i)V.i, s(i)V.k Proof V.i W.i V.k W.k (i,k)

More Related