110 likes | 333 Views
Termination Detection Algorithm for Distributed Computations. Edsger W. Dijkstra W.H.J. Feijen A.J.M. van Gasteren. Presented by : Charu Jain. Presentation and Derivation of the Algorithm. System Description N machines Active or Passive Stable State. Initiation.
E N D
Termination Detection Algorithm for Distributed Computations Edsger W. Dijkstra W.H.J. Feijen A.J.M. van Gasteren Presented by : Charu Jain
Presentation and Derivation of the Algorithm System Description N machines Active or Passive Stable State
Initiation Machine nr.0 initiates the “probe” Ring-Minimize the signaling traffic Assumption about passivity
Propagation • Propagation of the probe • System State - P • Probe ends with t=0
Stipulation for concluding termination • Termination • Invariant • t=0 • Info at nr.0 • Invariant has to hold independent of the distribution of the activity
Absence of Messages • P0 : (A i: t<i<N : machine nr.i is passive) • When active machine nr.i+1 keeps the token, when passive; it hands over the token to machine nr.i. • Termination Detection : • t=0 and additional info. available at nr.0
Presence of Messages • P0 is falsified -> Weaker invariant P0 V P1 • P1: (E j: 0<=j<=t : machine nr.j is black) • A machine sending a message to a machine with a number higher than it’s own makes itself Black • Termination Detection • (t=0^machine nr.0 is white) => ~P1
Continued… • P1 may be falsified and hence invariant P0 V P1 – Weaker invariant P0 V P1 V P2 • P2 : the token is black • nr. i+1 hands over a black token to nr. i if it itself is black • Termination detection • Token is white => ~P2
Unsuccessful Probe • A black token at nr. 0 or a black nr. 0 • Next probe • nr. 0 makes itself white and sends a white token to nr. N-1 • Upon transmission of the token to nr. i machine nr. i+1 becomes white (P1 is not falsified)
Termination • A probe initiated after termination will end up with all machines white, and , hence a next probe is guaranteed to return a white token to a white machine nr.0. • Simplified rule – A machine sending a message makes itself black. • Assumption of instantaneous messaging.