350 likes | 369 Views
Self-Stabilization: An approach for Fault-Tolerance in Distributed Systems. Stéphane Devismes. Fault-Tolerance. Robustness: Correct behaviour even when faults hit the system Pessimistic approach For permanent failures (e.g. process crash) Self-Stabilization [Dijkstra, 1974]:
E N D
Self-Stabilization:An approach for Fault-Tolerance in Distributed Systems Stéphane Devismes
Fault-Tolerance • Robustness: • Correct behaviour even when faults hit the system • Pessimistic approach • For permanent failures (e.g. process crash) • Self-Stabilization [Dijkstra, 1974]: • Forward recovery approach • Optimistic approach • For transient faults (e.g. memory corruption) Sémimaire VERIMAG
Roadmap • From an example to the definition • A practical example • Advantages • Drawbacks • Circumvent the drawbacks • Conclusion Sémimaire VERIMAG
Self-Stabilization [Dijkstra, 1974] • Example: Dijkstra’s Token Ring 0 1 2 1 0 1 0 1 0 0 1 Sémimaire VERIMAG
Starting from an arbitrary state 5 4 0 2 5 1 0 4 0 5 5 Sémimaire VERIMAG
Does it converges in any case? (1/3) • There always exists at least one token i i i i i Sémimaire VERIMAG
Does it converges in any case? (2/3) • At each step, at least one token moves forward or disappears • Eventually, the root generates a value that did not exist in the initial configuration (because K > N) Sémimaire VERIMAG
Does it converges in any case? (3/3) j d j j a c j j b Sémimaire VERIMAG
Definition: Closure + Convergence Closure Legitimate States Illegitimate States Convergence States of the System Sémimaire VERIMAG
Is the Dijkstra’s token ring realistic? • Computational Model • Topology • Knowledge about the network Sémimaire VERIMAG
BFS Spanning Tree [Huang & Chen, 1992] d1 =0 3 d1 =0 3 1 0 1 2 1 2 1 1 d2=2 2 1 d1=1 4 d4 =0 2 1 2 d2=1 d1=1 1 d2=2 d1=1 2 4 2 1 2 1 4 d4=3 3 3 Variable D: D=0 for the root D in [1…k] for the other (k>=Diam) d3=2 d3=2 d3=2 d1=2 1 3 1 d1=1 Every process periodically sends D to its neighbours Every non-root process stores in di the last D-value it receives from i Each time a di variable is updated, D is set to the minimal value of the di -variables + 1 5 3 6 2 2 d2=2 d2=3 2 Sémimaire VERIMAG
Advantage of self-stabilization (1/3) • Tolerance to any transient fault • Transient fault: • Duration: finite • Periodicity: rare • Effect: alter the contain of some component(s) of the network (processes and/or links) • E.g., memory/message corruption, crash-recover, lose of messages… Sémimaire VERIMAG
Advantage of self-stabilization (1/3) Sémimaire VERIMAG
Advantage of self-stabilization (2/3) • No initialization • Large-scale network • Self-organization in sensor network Sémimaire VERIMAG
Advantage of self-stabilization (3/3) • Dynamicity 0 1 2 5 3 4 1 1 2 3 5 2 3 Sémimaire VERIMAG
Drawbacks of self-stabilization (1/3) Stabilization Time • Eventually safe Sémimaire VERIMAG
Drawbacks of self-stabilization (2/3) • No detection of stabilization • Permanent local checks: Sémimaire VERIMAG
Drawbacks of self-stabilization (3/3) • Do not tolerant anykind of faults, e.g.: • Crash • Byzantine faults Sémimaire VERIMAG
Reduce the local checkings • Example: Maximal Independent Set Sémimaire VERIMAG
MIS Algorithm dominated Dominator Sémimaire VERIMAG
MIS Algorithm 3 2 9 8 5 4 1 10 7 6 Sémimaire VERIMAG
MIS Algorithm • Case: 3 9 6 4 Sémimaire VERIMAG
MIS Algorithm • Case: 3 9 6 4 Sémimaire VERIMAG
MIS Algorithm 3 3 2 2 9 9 8 5 5 5 4 4 4 1 1 10 10 10 7 7 7 6 6 Sémimaire VERIMAG
Tolerate more type of faults • E.g. Robust Stabilization • Leader Election Sémimaire VERIMAG
1 2 3 4 Model • Fully-connected network • Message-passing • Link: • Not necessarily FIFO • Reliable and synchronous • Process: • Synchronous or crashed • Identity Sémimaire VERIMAG
Leader Election (1/4) • A process p periodically sends ALIVE,p to every other if Leader = p ALIVE,1 1 4 LEADER=1 ALIVE,1 ALIVE,1 ALIVE,2 ALIVE,2 3 2 LEADER=2 LEADER=2 ALIVE,2 Sémimaire VERIMAG
1 4 3 2 Leader Election (2/4) • When a process p such that LEADER = p receives ALIVE from q, then LEADER := qif q < p ALIVE,1 LEADER=1 4 ALIVE,1 ALIVE,1 ALIVE,2 ALIVE,2 LEADER=2 LEADER=2 LEADER=1 ALIVE,2 Sémimaire VERIMAG
1 4 3 2 Leader Election (3/4) • Any process q such that LEADER ≠ q always chooses as leader the process from which it receives ALIVEthe most recently ALIVE,1 LEADER=1 4 ALIVE,1 ALIVE,1 LEADER=2 LEADER=1 LEADER=1 Sémimaire VERIMAG
1 4 3 2 Leader Election (4/4) • On Time out, a process p sets LEADER to p ALIVE,1 LEADER=3 LEADER=1 4 ALIVE,1 ALIVE,1 ALIVE,2 ALIVE,2 LEADER=2 LEADER=4 LEADER=2 ALIVE,2 Sémimaire VERIMAG
Conclusion (1/3) • Start of the art: • Many stabilizing solutions for wired networks: • [Katz & Perry] • [Delaet, Ducourthial, Tixeuil] • Recently, focus on: • Large-scale networks • Peer-to-peer systems • Sensor networks Sémimaire VERIMAG
Conclusion (2/3) • Derived properties • Strengthened Forms: • Tolerating more types of faults, e.g., byzantine and crash failures • Enhance the convergence property: Fault-containing Self-Stabilization Sémimaire VERIMAG
Conclusion (3/3) • Derived properties • Weakened Forms: • Probabilistic self-stabilization • Weak-stabilization • K-stabilization • Aim: Circumvent impossibility results, e.g., Colouring, Leader Election, Token Circulation in anonymous network Sémimaire VERIMAG
Stabilization Time of the Dijkstra’s Token Ring? 0 1 2 0 1 3 1 2 Sémimaire VERIMAG