1 / 20

Self-Stabilization with K-state machines

Self-Stabilization with K-state machines. By: Sukumar Ghosh Ajoy K. Datta Presented By:Ilan Cohen. Introduction. Dijkstra Algorithms. 1 st solution : K-state machines where K>N 2 nd solution : 4-state machines 3 rd solution : 3-state machines. Our Goal:.

shadow
Download Presentation

Self-Stabilization with K-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. Self-Stabilization with K-state machines By: Sukumar Ghosh Ajoy K. Datta Presented By:Ilan Cohen

  2. Introduction • Dijkstra Algorithms. 1st solution : K-state machines where K>N 2nd solution : 4-state machines 3rd solution : 3-state machines

  3. Our Goal: • Extending Dijkstra 3rd algorithm to K-state machines (K ≥ 3) • Extending a solution for M-state machines to K-state machines where K ≥ M.

  4. Dijkstra 3-state machines • For the bottom machine If (S+1) mod 3 = R then S:=(S-1) mod 3 fi; • For the top machine If L=R and (L+1) mod 3 ≠ S then S:=(L+1) mod 3 fi; • For the other machines If (S+1) mod 3 = L then S:=L fi; If (S+1) mod 3 = R then S:=R fi;

  5. First attempt • A state S in the range 0..(K-1) Could be express as (3q+r) where (0r 2) Change the rule according to S.r Example (for the bottom machine): If (S.r +1) mod 3 = R.r then S.r := (S.r – 1) mod 3 fi

  6. Drawback This solution would work BUT S.q does not alter the value of S.q under any circumstances. The machines behave essentially like a degenerate 3-state machine!

  7. The solution with 3k-state machine • Again r is S mod 3 but now we change the rule to: If (S.r + 1) mod 3= R.r then S:=(S-1) mod K fi

  8. Explanation As long as K is divisible by 3, S:= (S-1) mod K will cause S.r change Regularly in the sequence (..,2,1,0,2,1,0,…) Now the bottom machine behaves like a true 3k-state machine.

  9. Change in other machine For the top machine: If L.r=R.r and (L.r+1) mod 3 ≠ S.r then S := (L+1) mod K fi For the other machine: If (S.r+1) mod 3 = L.r then S:=L fi; If (S.r+1) mod 3 = R.r then S:=R fi;

  10. Example: 6-state machine • State 0 (q,r) = (0,0) • State 1 (q,r) = (0,1) • State 2 (q,r) = (0,2) • State 3 (q,r) = (1,0) • State 4 (q,r) = (1,1) • State 5 (q,r) = (1,2)

  11. Theorem 1: The proposed algorithm ensures that with 3k-state machines in a finite number of moves, only one machine enjoy the privilege. Proof : the proof is based on the correctness of the solution with 3-state machine. The privileges of various machines have been derived by substituting every state value by its r-part, and using the corresponding privileges used in the solution with 3-state machine. Also, the moves used here imply the moves used in the solution with 3-state machine, with the desirable side affect that the q-part of the state is also change properly.

  12. The solution with (3k+1)-state machine Claim: the solution for the 3k-state machine is applicable to self-stabilization with (3k+1)-state machines also. The only issue of concern is whether the proposed change S in such a way that S.r mimics the corresponding moves for Dijkstra’s solution with 3-state machine.

  13. The solution with (3k+1)-state machinecont. If S=0 then S := (S-1) mod K does not change the value of S.r. Fortunately: • A neighboring machine interprets this move as not taken place at all. • The old privileges is still valid. • Another move S:=(S-1) mod K make the change in S.r correctly. • Allowing machine to make two successive moves does not conflict with the features of self-stabilization problem.

  14. Example: 4-state machine • State 0 (q,r) = (0,0) • State 1 (q,r) = (0,1) • State 2 (q,r) = (0,2) • State 3 (q,r) = (1,0)

  15. The solution with (3k+2)-state machine Here, if S=0 then a move S:=(S-1) mod K change the value of S.r from 0 to 1! This is equivalent to wrong move S.r : = (S.r+1) mod 3.

  16. Solution: A simple solution is to use a modified encoding scheme for the states, so we keep the sequence (0,1,2,0,1,2,...) which some value of S.r may appear consecutively several times. It is easy to observe that with all 3k+2 state machines such an encoding is possible.

  17. Example: 5-state machine Original, Change • State 0 (q,r) = (0,0) (0,0) • State 1 (q,r) = (0,1) (0,1) • State 2 (q,r) = (0,2) (1,1) • State 3 (q,r) = (1,0) (0,2) • State 4 (q,r) = (1,1) (1,0)

  18. For General K=3k+2 state 0 State 1 State 2 State 3 . . State 3k-2 State 3k-1 State 3k State 3k+1 (0,0) (0,1) (0,2) (1,0) . . (k-1,1) (k-1,2) (k,0) (k,1) (0,0) (0,1) (0,2) (1,0) . . (k-1,1) (k,1) (k-1,2) (k,0)

  19. Conclusion • Since the proposed algorithm is applicable to systems containing 3k-state machines,3k+1 state machines and 3k+2 state machine it is applicable to all K-state machine (K≥3). • With (3k+2)-state machines a modified state encoding scheme is essential.

  20. References • Sukumar Ghosh- Self-stabilization with K-state machines • Dijkstra, E.W. “self stabilizing Systems in of Distributed Control”. • Dijkstra, E.W. “ A belated proof of Self-Stabilization”

More Related