Download presentation
Presentation is loading. Please wait.
1
chapter 5.1 - Resynchsonous Stabilizer 5.1- 1 Chapter 5.1 Resynchsonous Stabilizer Self-Stabilization Shlomi Dolev MIT Press, 2000 Draft of Jan 2004, Shlomi Dolev, All Rights Reserved ©
2
chapter 5.1 - Resynchsonous Stabilizer 5.1- 2 The Problem Converting non-stabilizing algorithms to self- stabilizing algorithms We will deal with a fixed input, fixed output algorithms The main problem is that we do not know in what state does the algorithm begin, so we cannot perform initiation
3
chapter 5.1 - Resynchsonous Stabilizer 5.1- 3 Definitions Denote : AL – A non stabilizing algorithm SA – The stabilizing version of AL Synchronous execution time of AL – the number of steps until the algorithm produces the desired output, in a synchronous system (any asynchronous algorithm works also in a synchronous system)
4
chapter 5.1 - Resynchsonous Stabilizer 5.1- 4 A First Solution Every processor maintains the list of states it had been in during the algorithm At every step the processors send to their neighbors their lists A processor that receives the tables of it’s neighbors checks it's table. If there is an error, fix it. Else compute the next state
5
chapter 5.1 - Resynchsonous Stabilizer 5.1- 5 Example - Leader Election 3 10 … 7 5 9 … 1000 105 3 … 20 5 7 … 3 … 10 1000 … 5 20 … 7 1000 … 10 … 3 7 5 5 1000 … 7 7 … 3 10 1000 … 7 7 10 … 5 … 3 … …
6
chapter 5.1 - Resynchsonous Stabilizer 5.1- 6 Why Does it Work? The first state of AL is defined only by the initiation of the processors After the first cycle, all the processors have the right first state Let us assume that after n cycles all processors have n correct entries in their tables In the next cycle every processor will get the tables of its neighbors and compute its n+1 state correctly
7
chapter 5.1 - Resynchsonous Stabilizer 5.1- 7 Perhaps it is too Expensive The shown approach produces an algorithm that has the same time performance of the non- stabilizing algorithm Space complexity is a different story. The processors hold in memory the computing sequence of all their neighbors The messages are very big, and on every cycle messages are sent on every edge
8
chapter 5.1 - Resynchsonous Stabilizer 5.1- 8 A New Hope A possible way of improving the synchronizer is to hold a floating output If AL has execution time of t, the system includes a stabilizing counting algorithm which has a wraparound larger than t Every time the counter reaches 0, the system is initialized. The floating values are not initialized.
9
chapter 5.1 - Resynchsonous Stabilizer 5.1- 9 Example - Consensus Algorithm In the consensus algorithm, the algorithm should return an answer after d cycles Every d cycles, the output is copied to the floating output, and the input is copied to the output After the first round, the floating output will remain constant
10
chapter 5.1 - Resynchsonous Stabilizer 5.1- 10 Randomized Algorithms When we try to implement the above method to random algorithms we encounter two difficulties: A randomized algorithm does not have an upper bound to it’s execution The output of such algorithms may change from one execution to another. The floating value can be changed infinitely often
11
chapter 5.1 - Resynchsonous Stabilizer 5.1- 11 The Solution Check the old output validity, if invalid Execute the algorithm Every t cycles, check if the algorithm is stabilized. if it is not, reset the system In some executions of the algorithm it will stabilize (with probability 1) When stabilized update the output
12
chapter 5.1 - Resynchsonous Stabilizer 5.1- 12 Example – Leader Election In the uniform system leader election algorithm, every processor chooses a random ID, and sends it to it’s neighbors If a processor receives an ID larger than it’s own, it resigns from the “race”, and will not participate in the next round If no message is transmitted through a whole round, all processors are initiated
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.