on stabilization in herman s algorithm
play

On Stabilization in Hermans Algorithm ICALP 2011 Stefan Kiefer 1 - PowerPoint PPT Presentation

On Stabilization in Hermans Algorithm ICALP 2011 Stefan Kiefer 1 Andrzej S. Murawski 2 el Ouaknine 1 Jo James Worrell 1 Lijun Zhang 3 1 Department of Computer Science, University of Oxford, UK 2 Department of Computer Science, University of


  1. On Stabilization in Herman’s Algorithm ICALP 2011 Stefan Kiefer 1 Andrzej S. Murawski 2 el Ouaknine 1 Jo¨ James Worrell 1 Lijun Zhang 3 1 Department of Computer Science, University of Oxford, UK 2 Department of Computer Science, University of Leicester, UK 3 DTU Informatics, Technical University of Denmark, Denmark

  2. Particle Collision: CERN

  3. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) Some processors have a token. Pick a token randomly and move it clockwise. When a processor has two tokens: both disappear. Once there is only one token: this processor is the leader.

  4. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) Some processors have a token. Pick a token randomly and move it clockwise. When a processor has two tokens: both disappear. Once there is only one token: this processor is the leader.

  5. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) Some processors have a token. Pick a token randomly and move it clockwise. When a processor has two tokens: both disappear. Once there is only one token: this processor is the leader.

  6. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) Some processors have a token. Pick a token randomly and move it clockwise. When a processor has two tokens: both disappear. Once there is only one token: this processor is the leader.

  7. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) Some processors have a token. Pick a token randomly and move it clockwise. When a processor has two tokens: both disappear. Once there is only one token: this processor is the leader.

  8. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) Some processors have a token. Pick a token randomly and move it clockwise. When a processor has two tokens: both disappear. Once there is only one token: this processor is the leader.

  9. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) Some processors have a token. Pick a token randomly and move it clockwise. When a processor has two tokens: both disappear. Once there is only one token: this processor is the leader.

  10. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) 1 0 1 Some processors have a token. 1 0 Pick a token randomly and 1 move it clockwise. 0 0 When a processor has two tokens: 1 both disappear. 0 0 1 0 Once there is only one token: this processor is the leader. Implementation: token = same bit as counter-clockwise neighbour

  11. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) 1 0 1 Some processors have a token. 1 0 Pick a token randomly and 1 move it clockwise. 0 1 When a processor has two tokens: 1 both disappear. 0 0 1 0 Once there is only one token: this processor is the leader. Implementation: token = same bit as counter-clockwise neighbour

  12. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) 1 0 1 Some processors have a token. 1 0 Pick a token randomly and 1 move it clockwise. 0 1 When a processor has two tokens: 1 both disappear. 0 0 1 1 Once there is only one token: this processor is the leader. Implementation: token = same bit as counter-clockwise neighbour

  13. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) 1 0 1 Some processors have a token. 1 0 Pick a token randomly and 0 move it clockwise. 0 1 When a processor has two tokens: 1 both disappear. 0 0 1 1 Once there is only one token: this processor is the leader. Implementation: token = same bit as counter-clockwise neighbour

  14. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) 1 0 1 Some processors have a token. 1 0 Pick a token randomly and 0 move it clockwise. 0 1 When a processor has two tokens: 1 both disappear. 0 0 1 1 Once there is only one token: this processor is the leader. Implementation: token = same bit as counter-clockwise neighbour

  15. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) 1 0 1 Some processors have a token. 1 0 Pick a token randomly and 0 move it clockwise. 0 1 When a processor has two tokens: 1 both disappear. 0 0 1 1 Once there is only one token: this processor is the leader. Implementation: token = same bit as counter-clockwise neighbour Number of tokens is odd. At any time. Guaranteed!

  16. Herman’s Algorithm Herman’s algorithm is a randomized leader election protocol. Ring of N processors ( N is odd) 1 0 1 Some processors have a token. 1 0 Pick a token randomly and 0 move it clockwise. 0 1 When a processor has two tokens: 1 both disappear. 0 0 1 1 Once there is only one token: this processor is the leader. Implementation: token = same bit as counter-clockwise neighbour Number of tokens is odd. At any time. Guaranteed! Main Question: How long does it take – on average – until a leader is elected?

  17. Herman’s Algorithm Two versions of Herman’s algorithm: Asynchronous: Each processor with a token passes the token to its clockwise neighbour with rate λ continuous-time Markov chain (as seen on the previous slides) Synchronous: Each processor with a token with probability 1 / 2: passes it (i.e., flips its bit) with probability 1 / 2: keeps it (i.e., keeps its bit) discrete-time Markov chain

  18. Herman’s Algorithm Illustration of the synchronous version:

  19. Herman’s Algorithm Illustration of the synchronous version:

  20. Herman’s Algorithm Illustration of the synchronous version:

  21. Herman’s Algorithm Illustration of the synchronous version:

  22. Herman’s Algorithm Illustration of the synchronous version: The synchronous version is standard. The probability of passing is usually chosen as 1 / 2, but is a parameter in our analysis. We study both versions (asynchronous and synchronous).

  23. Self-Stabilization Self-stabilization: a concept of fault-tolerance: Any configuration leads to a “legitimate” configuration (in Herman: a single-token configuration). Dijkstra (1974): In a token ring there is no symmetric deterministic self-stabilizing algorithm.

  24. Self-Stabilization Self-stabilization: a concept of fault-tolerance: Any configuration leads to a “legitimate” configuration (in Herman: a single-token configuration). Dijkstra (1974): In a token ring there is no symmetric deterministic self-stabilizing algorithm.

  25. Time to Stabilization Let T := time until a 1-token configuration is reached. What is E T ? Markov Chain argument E T is finite for any initial conf.

  26. Time to Stabilization Let T := time until a 1-token configuration is reached. What is E T ? Markov Chain argument E T is finite for any initial conf. 1990 Herman: invented the protocol showed E T ≤ 0 . 5 N 2 log N mentions improvement to E T ≤ c N 2 2004 Fribourg et al.: E T ≤ 2 N 2 2005 McIver/Morgan: E T ≤ 2 N 2 (independently) 2005 Nakata: E T ≤ 0 . 93 N 2

  27. Time to Stabilization Let T := time until a 1-token configuration is reached. What is E T ? Markov Chain argument E T is finite for any initial conf. 1990 Herman: invented the protocol showed E T ≤ 0 . 5 N 2 log N mentions improvement to E T ≤ c N 2 2004 Fribourg et al.: E T ≤ 2 N 2 2005 McIver/Morgan: E T ≤ 2 N 2 (independently) 2005 Nakata: E T ≤ 0 . 93 N 2 Theorem Let D = r (1 − r ) (for synchronous) or D = λ (for asynchronous). � π 2 · N 2 8 − 29 � Then D . E T ≤ 27 In particular, for synchronous and r = 1 / 2 , we have E T ≤ 0 . 64 N 2 .

  28. The 3-Token Case

  29. The 3-Token Case a Precise formula for 3 tokens [MM’05]: E T = 4 abc / N b c

  30. The 3-Token Case a Precise formula for 3 tokens [MM’05]: E T = 4 abc / N b c Maximized for equilateral configuration with a = b = c = N / 3 27 N 2 = 0 . 148 N 2 E T = 4

  31. The 3-Token Case a Precise formula for 3 tokens [MM’05]: E T = 4 abc / N b c Maximized for equilateral configuration with a = b = c = N / 3 27 N 2 = 0 . 148 N 2 E T = 4 Open conjecture [MM’05]: 3-token equilateral conf. is worse than any other conf. If true, then E T ≤ 0 . 148 N 2 (cf. E T ≤ 0 . 64 N 2 ).

  32. The Full Configuration Theorem Let D = r (1 − r ) (for synchronous) or D = λ (for asynchronous). Starting in the full configuration, for almost all odd N: E T ≤ 0 . 0285 N 2 / D . In particular, for synchronous and r = 1 / 2 , we have E T ≤ 0 . 114 N 2 . (cf. for general conf.: E T ≤ 0 . 64 N 2 for equilateral conf.: E T = 0 . 148 N 2 )

  33. The Full Configuration Theorem Let D = r (1 − r ) (for synchronous) or D = λ (for asynchronous). Starting in the full configuration, for almost all odd N: E T ≤ 0 . 0285 N 2 / D . In particular, for synchronous and r = 1 / 2 , we have E T ≤ 0 . 114 N 2 . (cf. for general conf.: E T ≤ 0 . 64 N 2 for equilateral conf.: E T = 0 . 148 N 2 ) What about a random initial configuration?

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