Global state collection

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

Global States.
Optimal Termination Detection for Rings Murat Demirbas OSU.
Lecture 8: Asynchronous Network Algorithms
SES Algorithm SES: Schiper-Eggli-Sandoz Algorithm. No need for broadcast messages. Each process maintains a vector V_P of size N - 1, N the number of processes.
Program correctness The State-transition model A global state S  s 0 x s 1 x … x s m {s k = local state of process k} S0  S1  S2  … Each state transition.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Uncoordinated Checkpointing The Global State Recording Algorithm.
Uncoordinated Checkpointing The Global State Recording Algorithm Cristian Solano.
6.852: Distributed Algorithms Spring, 2008 Class 12.
Termination Detection of Diffusing Computations Chapter 19 Distributed Algorithms by Nancy Lynch Presented by Jamie Payton Oct. 3, 2003.
Termination Detection. Goal Study the development of a protocol for termination detection with the help of invariants.
Termination Detection Part 1. Goal Study the development of a protocol for termination detection with the help of invariants.
Global State Collection. Global state collection Some applications - computing network topology - termination detection - deadlock detection Chandy-Lamport.
Distributed Snapshot (continued)
Distributed Systems Dinesh Bhat - Advanced Systems (Some slides from 2009 class) CS 6410 – Fall 2010 Time Clocks and Ordering of events Distributed Snapshots.
Termination Detection Presented by: Yonni Edelist.
Ordering and Consistent Cuts
Chapter 11 Detecting Termination and Deadlocks. Motivation – Diffusing computation Started by a special process, the environment environment sends messages.
Broadcast & Convergecast Downcast & Upcast
UBI529 Distributed Algorithms
10.- Graph Algorithms Centro de Investigación y Estudios Avanzados del Instituto Politécnico Nacional Introduction Routing Algorithms Computation of Shortest.
Distributed Snapshot. Think about these -- How many messages are in transit on the internet? --What is the global state of a distributed system of N processes?
Termination Detection
Program correctness The State-transition model The set of global states = so x s1 x … x sm {sk is the set of local states of process k} S0 ---> S1 --->
Program correctness The State-transition model A global states S  s 0 x s 1 x … x s m {s k = set of local states of process k} S0  S1  S2  Each state.
Distributed Snapshot. One-dollar bank Let a $1 coin circulate in a network of a million banks. How can someone count the total $ in circulation? If not.
Tree Constructions Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
Global State Collection
Dijkstra-Scholten and Shavit-Francez termination algorithms
Graph Algorithms Why graph algorithms ? It is not a “graph theory” course! Many problems in networks can be modeled as graph problems. Note that -The topology.
CSE 486/586 CSE 486/586 Distributed Systems Global States Steve Ko Computer Sciences and Engineering University at Buffalo.
Hwajung Lee. Some applications - computing network topology - termination detection - deadlock detection Chandy Lamport algorithm does a partial job.
1 Chapter 11 Global Properties (Distributed Termination)
Hwajung Lee. -- How many messages are in transit on the internet? --What is the global state of a distributed system of N processes? How do we compute.
Hwajung Lee. Mutual Exclusion CS p0 p1 p2 p3 Some applications are:  Resource sharing  Avoiding concurrent update on shared data  Controlling the.
CIS 825 Lecture 9. Minimum Spanning tree construction Each node is a subtree/fragment by itself. Select the minimum outgoing edge of the fragment Send.
Global state and snapshot
Termination detection
Consistent cut A cut is a set of events.
PROTOCOL CORRECTNESS Tutorial 3 Theoretical
Lecture 3: State, Detection
The Echo Algorithm The echo algorithm can be used to collect and disperse information in a distributed system It was originally designed for learning network.
Advanced Topics in Concurrency and Reactive Programming: Time and State Majeed Kassis.
Global state and snapshot
Lecture 3: State, Detection
Theoretical Foundations
Lecture 9: Asynchronous Network Algorithms
ITEC452 Distributed Computing Lecture 9 Global State Collection
Distributed Snapshot.
EECS 498 Introduction to Distributed Systems Fall 2017
ITEC452 Distributed Computing Lecture 5 Program Correctness
Distributed Snapshot.
Decentralized solution 1
湖南大学-信息科学与工程学院-计算机与科学系
Mutual Exclusion Problem Specifications
Mutual Exclusion CS p0 CS p1 p2 CS CS p3.
Global State Collection
Distributed Snapshot Distributed Systems.
ITEC452 Distributed Computing Lecture 7 Mutual Exclusion
ITEC452 Distributed Computing Lecture 8 Distributed Snapshot
Distributed deadlock Assume each process owns a few resources, and review how resources are allocated. Why deadlocks occur? - Exclusive (i.e not shared)
Dijkstra-Scholten and Shavit-Francez termination algorithms
Distributed Snapshot.
Jenhui Chen Office number:
Distributed algorithms
CIS825 Lecture 5 1.
Consistent cut If this is not true, then the cut is inconsistent
Chandy-Lamport Example
Distributed Snapshot.
Presentation transcript:

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

A simple exercise s(i) s(j) i j s(k) s(l) k l Collect 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 } s(i) s(j) i j s(k) s(l) k l

A simple exercise V.i W.i (i,k) V.k W.k 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 V.i W.i (i,k) V.k W.k

Proof empty (i. k)  W.i  V.k. V.i W.i (i,k) V.k W.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 V.i W.i (i,k) V.k W.k

Termination detection In a network, processes may be active or passive. Termination implies: (a) every process is passive, (b) all channels are empty, and (c) the global state of the system satisfies the desired postcondition

Termination detection The progress of a computation. Notice how one process engages another process. Eventually All processes turn white - this signals termination.

Dijkstra-Scholten algorithm An initiator initiates termination detection by sending a signal down the edge when it engages another node. At a “suitable time,” the recipient sends an ack back. When the initiator receives ack, it detects termination. Node j engages node k. j k j k j k

Dijkstra-Scholten algorithm Deficit (e) = # of signals on e - # of ack on e For any node, C= deficit along incoming edges D= deficit along outgoing edges edges Invariant 1. (C ≥ 0)  (D ≥ 0) Invariant 2. (C > 0)  (D = 0) 1 2 3 4 5

Dijkstra-Scholten algorithm Invariant 1. (C ≥ 0)  (D ≥ 0) Invariant 2. (C > 0)  (D = 0) The invariants must hold when an interim node sends an ack. So (C-1 ≥ 0)  (C-1> 0 D=0) {follows from INV1 and INV2} = (C>1)  (C≥1  D=0) = (C>1) (C=1  D=0) 1 2 3 4 5

Dijkstra-Scholten algorithm program detect {for an internal node i} initially C=0, D=0, parent = i do m = signal  (C=0)  C:=1; state:= active; parent := sender m = ack  D:= D-1 (C=1 D=0)  state = passive  send ack to parent; C:= 0; parent := i m = signal  (C=1)  send ack to the sender; od 1 2 3 4 5

Dijkstra-Scholten algorithm The engagement edges form a spanning tree. The tree grows and shrinks. Signals are acknowledged on very-first-in-very-last-out basis Termination is detected when the initiator receives ack. 1 2 3 4 5