Download presentation
Presentation is loading. Please wait.
1
Self-stabilization
2
Example 1 System of n clocks ticking at the same rate. 1
Clock phase synchronization System of n clocks ticking at the same rate. Each clock is 3-valued, i,e it ticks as 0, 1, 2, 0, 1, 2… A failure may arbitrarily alter the clock phases. The clocks need to return to the same phase. . 1 2 3 n-1
3
Proof of liveness: an example
∀k: c[k] ∈ {0,1,2} Clock phase synchronization {Program for each clock} (c[k] = phase of clock k, initially arbitrary) do ∃j: j∈ N(i) :: c[j] = c[i] +1 mod 3 → c[i] := c[i] + 2 mod 3 [] ∀j: j ∈ N(i) :: c[j] ≠ c[i] +1 mod 3 → c[i] := c[i] + 1 mod 3 od Show that eventually all clocks will return to the same phase (convergence), and continue to be in the same phase (closure) 1 2 3 n-1
4
Proof of convergence Let D = d[0] + d[1] + d[2] + … + d[n-1] d[i] = if no arrow points towards clock i; = i + 1 if a ← points towards clock i; = n - i if a → points towards clock i; = 1 if both → and ← point towards clock i. By definition, D ≥ 0. Also, D decreases after every step in the system. So the number of arrows must reduce to 0. 1 2 n-1 2 2 2 1 1 1 1 2 2 2 2 2 Understand the game of arrows
5
Example 2 Design a self-stabilizing algorithm for constructing
a spanning tree of a network. The root is given Assume - There are n nodes Each node i has two variables: parent p(i), and - a label L(i) that measures the distance of i from the root via tree edges. - By definition, L(root) = 0
6
Example 2 Algorithm due to Chen, Yu, and Huang (1991)
7
Example 2 Algorithm due to Chen, Yu, and Huang (1991)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.