self stabilization 1 goals of the lecture self stabili
play

Self Stabilization 1 Goals of the lecture: Self-stabili - PowerPoint PPT Presentation

Self Stabilization 1 Goals of the lecture: Self-stabili zation F ault-tolerance Denition of self-stabilizing Algo rithm with K -state Machines Pro of Algo rithm with 3 -state Machines Pro


  1. Self Stabilization 1 Goals of the lecture: Self-stabili zation � F ault-tolerance � De�nition of self-stabilizing � Algo rithm with K -state Machines � Pro of � Algo rithm with 3 -state Machines � Pro of References: Dijkstra 74, Dijkstra 86 � Vija c y K. Ga rg Distributed Systems F all 94

  2. Self Stabilization 2 F ault-tolerance � systems which recover from faults � self-stabilization: highly fault-tolerant � a fault can change any data � system view ed as consisting of legal and illegal states � self-stabilzation: should reach a legal state in �nite moves � Vija c y K. Ga rg Distributed Systems F all 94

  3. Self Stabilization 3 T erminolo gy � Underlying top ology: connection graph � neighb o rs � p rivilege: b o olean function of � o wn state, � states of its neighb o rs � legal state: application dep endent � Vija c y K. Ga rg Distributed Systems F all 94

  4. Self Stabilization 4 Requirements on legal state � In each legal state, one o r mo re p rivileges � any move from a legal state leads to a legal state � each p rivilege p resent in at least one legal state � fo r any pair of legal states, there exist a sequence of trans- ferring moves De�nition of self-stabilzati on: Rega rdless of initial state, and p rivilege selected each time, the system is gua ranteed to reach a legal state after a �nite numb er of moves. � Vija c y K. Ga rg Distributed Systems F all 94

  5. Self Stabilization 5 Example: Mutual Exclusion legal state: exactly one p rivilege � N+1 machines numb ered 0..N � L,S,R: states of left, self, right � b ottom machine: machine 0 � fo rmat: if p rivilege then co rresp onding move � c � Vija y K. Ga rg Distributed Systems F all 94

  6. Self Stabilization 6 Algo rithm I: K -state machine ( K > N ) Bottom: if (L=S) then S := S+1 mo d K � F o r other machines: if ( L 6 = S ) then S := L � c � Vija y K. Ga rg Distributed Systems F all 94

  7. Self Stabilization 7 Example 4 4 4 t t t 1 1 2 2 t 2 t 2 t t t t ) ) t t t t t t 3 3 4 B B B 4 4 4 t t t 3 4 4 + 4 4 4 t t t 4 4 4 2 t 4 t 4 t t t t ( ( t t t t t t 4 4 4 B B B 4 4 4 t t t 4 4 5 c � Vija y K. Ga rg Distributed Systems F all 94

  8. Self Stabilization 8 Pro of Lemma 0: If the system is in a legal state, then it will sta y legal. Lemma 1: A sequence of moves in which Bottom do es not move is �nite. Lemma 2: Given any con�guration, either (1) no other machine has the same state as the b ottom, o r (2) there exists a value which is di�erent from all machines. Lemma 3: With in a �nite numb er of moves, pa rt one of Lemma 2 will b e true. Theo rem 1: Within �nite numb er of moves, the system will reach a legal state. c � Vija y K. Ga rg Distributed Systems F all 94

  9. Self Stabilization 9 Algo rithm I I: 3 -state machine Ring of at least 3 machines Bottom: B, No rmal: N, T op: T con�guration view ed as a string of 0,1,2 Bottom: if ( B + 1 = R ) then B := B + 2 ; No rmal: if ( L = S + 1) o r ( R = S + 1) then S := S + 1 ; T op: if ( L = B ) and ( T 6 = B + 1) then T := B + 1 c � Vija y K. Ga rg Distributed Systems F all 94

  10. Self Stabilization 10 Viewing the string with a rro ws y = # of left-p ointing + 2# of right-p ointing Bottom : (0) B R to B ! R � y = +1 No rmal Machine: (1) L ! S R to L S ! R � y = 0 (2) L S R to L S R � y = 0 (3) L ! S R to L S R � y = � 3 (4) L ! S ! R to L S R � y = � 3 (5) L S R to L ! S R � y = 0 T op Machine (p rivilege also dep ends on B): (6) L ! T to L T � y = +1 (7) L T to L T � y = +1 c � Vija y K. Ga rg Distributed Systems F all 94

  11. Self Stabilization 11 Example 1 ! 0 ! 2 0 z z z z T B 1 1 2 0 z z z z T B 1 2 2 0 z z z z T B 0 ! 2 2 0 z z z z T B 0 0 ! 2 0 z z z z T B 0 0 0 0 z z z z T B 0 0 0 1 z z z z T B � Vija c y K. Ga rg Distributed Systems F all 94

  12. Self Stabilization 12 Pro of Claim: Single a rro w implies it sta ys that w a y . Claim: string free from a rro w creates one in a single move. No w sho w that if multiple a rro w then y will b e decreased in �nite moves. c � Vija y K. Ga rg Distributed Systems F all 94

  13. Self Stabilization 13 Pro of contd Lemma 0: Bet w een t w o successive moves of T op at least one move of Bottom tak es place. Lemma 1: A sequence of moves in which Bottom do es not move is �nite. Pro of: su�cient to consider no rmal machines. (3),(4),(5) decrease numb er of a rro ws. (1) and (2) moves �nite due to top ology . Theo rem: Within �nite moves, there is one a rro w in the string. Pro of:b et w een successive moves of b ottom, falsi�cation of \left- most a rro w exists and p oints to the right" happ en in (3), (4), o r (6). if (6) then done. If (3) o r (4), y decreases b y 3. y can increase b y at most 2 p er move of Bottom, thus y is decreased b y 1. c � Vija y K. Ga rg Distributed Systems F all 94

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend