CS60002: Distributed Systems

Slides:



Advertisements
Similar presentations
CS 603 Process Synchronization: The Colored Ticket Algorithm February 13, 2002.
Advertisements

Mutual Exclusion – SW & HW By Oded Regev. Outline: Short review on the Bakery algorithm Short review on the Bakery algorithm Black & White Algorithm Black.
Models of Concurrency Manna, Pnueli.
Chapter 6 - Convergence in the Presence of Faults1-1 Chapter 6 Self-Stabilization Self-Stabilization Shlomi Dolev MIT Press, 2000 Shlomi Dolev, All Rights.
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Process Synchronization Continued 7.2 The Critical-Section Problem.
Multiprocessor Synchronization Algorithms ( ) Lecturer: Danny Hendler The Mutual Exclusion problem.
CS 484. Discrete Optimization Problems A discrete optimization problem can be expressed as (S, f) S is the set of all feasible solutions f is the cost.
Self Stabilizing Algorithms for Topology Management Presentation: Deniz Çokuslu.
Self-stabilizing Distributed Systems Sukumar Ghosh Professor, Department of Computer Science University of Iowa.
Self-Stabilization in Distributed Systems Barath Raghavan Vikas Motwani Debashis Panigrahi.
Chapter 18 Self-Stabilization. Introduction Self-stabilization: Tolerate ‘data faults’  Example: Parent pointers in a spanning tree getting corrupted.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Self Stabilization 1.
Lecture 4: Elections, Reset Anish Arora CSE 763 Notes include material from Dr. Jeff Brumfield.
UBE529 Distributed Algorithms Self Stabilization.
Termination Detection. Goal Study the development of a protocol for termination detection with the help of invariants.
Termination Detection Part 1. Goal Study the development of a protocol for termination detection with the help of invariants.
CPSC 668Set 7: Mutual Exclusion with Read/Write Variables1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Chapter 8 - Self-Stabilizing Computing1 Chapter 8 – Self-Stabilizing Computing Self-Stabilization Shlomi Dolev MIT Press, 2000 Draft of January 2004 Shlomi.
1 Distributed Computing Algorithms CSCI Distributed Computing: everything not centralized many processors.
CPSC 668Self Stabilization1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CS294, YelickSelf Stabilizing, p1 CS Self-Stabilizing Systems
Outline Max Flow Algorithm Model of Computation Proposed Algorithm Self Stabilization Contribution 1 A self-stabilizing algorithm for the maximum flow.
Concurrency in Distributed Systems: Mutual exclusion.
Self-Stabilization An Introduction Aly Farahat Ph.D. Student Automatic Software Design Lab Computer Science Department Michigan Technological University.
Binary Self - Stabilization By: Sukumar Ghosh Presented By: Ilan Cohen.
Chapter Resynchsonous Stabilizer Chapter 5.1 Resynchsonous Stabilizer Self-Stabilization Shlomi Dolev MIT Press, 2000 Draft of Jan 2004, Shlomi.
CS 603 Dining Philosopher’s Problem February 15, 2002.
The stabilizing token ring in three bits Mohamed G. Gouda F. Furman Haddix Presented by: Marc Segal.
Self Stabilization Classical Results and Beyond… Elad Schiller CTI (Grece)
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
Selected topics in distributed computing Shmuel Zaks
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
Fault-containment in Weakly Stabilizing Systems Anurag Dasgupta Sukumar Ghosh Xin Xiao University of Iowa.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 10 Instructor: Haifeng YU.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
Fault-containment in Weakly Stabilizing Systems Anurag Dasgupta Sukumar Ghosh Xin Xiao University of Iowa.
By J. Burns and J. Pachl Based on a presentation by Irina Shapira and Julia Mosin Uniform Self-Stabilization 1 P0P0 P1P1 P2P2 P3P3 P4P4 P5P5.
Program correctness The State-transition model The set of global states = so x s1 x … x sm {sk is the set of local states of process k} S0 ---> S1 --->
6.852: Distributed Algorithms Spring, 2008 Class 25-1.
Autonomic distributed systems. 2 Think about this Human population x10 9 computer population.
Self-Stabilizing K-out-of-L Exclusion on Tree Networks Stéphane Devismes, VERIMAG Joint work with: – Ajoy K. Datta (Univ. Of Nevada) – Florian Horn (LIAFA)
Self-Stabilizing K-out-of-L Exclusion on Tree Networks Stéphane Devismes, VERIMAG Joint work with: – Ajoy K. Datta (Univ. Of Nevada) – Florian Horn (LIAFA)
Program correctness The State-transition model A global states S  s 0 x s 1 x … x s m {s k = set of local states of process k} S0  S1  S2  Each state.
Hwajung Lee. The State-transition model The set of global states = s 0 x s 1 x … x s m {s k is the set of local states of process k} S0  S1  S2  Each.
Stabilization Presented by Xiaozhou David Zhu. Contents What-is Motivation 3 Definitions An Example Refinements Reference.
Hwajung Lee. The State-transition model The set of global states = s 0 x s 1 x … x s m {s k is the set of local states of process k} S0  S1  S2  Each.
University of Iowa1 Self-stabilization. The University of Iowa2 Man vs. machine: fact 1 An average household in the developed countries has 50+ processors.
Self-stabilization. What is Self-stabilization? Technique for spontaneous healing after transient failure or perturbation. Non-masking tolerance (Forward.
CS 542: Topics in Distributed Systems Self-Stabilization.
1 Fault tolerance in distributed systems n Motivation n robust and stabilizing algorithms n failure models n robust algorithms u decision problems u impossibility.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Self-stabilization. Technique for spontaneous healing after transient failure or perturbation. Non-masking tolerance (Forward error recovery). Guarantees.
Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated.
Program Correctness. The designer of a distributed system has the responsibility of certifying the correctness of the system before users start using.
Superstabilizing Protocols for Dynamic Distributed Systems Authors: Shlomi Dolev, Ted Herman Presented by: Vikas Motwani CSE 291: Wireless Sensor Networks.
ITEC452 Distributed Computing Lecture 15 Self-stabilization Hwajung Lee.
By J. Burns and J. Pachl Presented by: Irina Shapira Julia Mosin February1999 February 1999 Uniform Self-Stabilization.
Self-Stabilizing Systems
CSE-591: Term Project Self-stabilizing Network Algorithms by Tridib Mukherjee ASU ID :
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
第1部: 自己安定の緩和 すてふぁん どぅゔぃむ ポスドク パリ第11大学 LRI CNRS あどばいざ: せばすちゃ てぃくそい
Distributed Mutual Exclusion
Wave and Traversal Algorithms
Atomicity, Non-determinism, Fairness
ITEC452 Distributed Computing Lecture 5 Program Correctness
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Non-Distributed Excercises
Chapter 2 Self-Stabilization
CS60002: Distributed Systems
Presentation transcript:

CS60002: Distributed Systems Self-Stabilization CS60002: Distributed Systems INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Definition of self-stabilization A system S is self-stabilizing with respect to predicate P if it satisfies the following two properties: Closure: P is closed under the execution of S. That is, once P is established in S, it cannot be falsified. Convergence: Starting from an arbitrary global state, S is guaranteed to reach a global state satisfying P within a finite number of state transitions. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Definition of stabilization [Arora and Gouda] We define stabilization for system S with respect to two predicates P and Q, over its set of global states. Predicate Q denotes a restricted start condition. S satisfies Q  P (read as Q stabilizes to P) if it satisfies the following two properties: Closure: P is closed under the execution of S. That is, once P is established in S, it cannot be falsified. Convergence: If S starts from any global state that satisfies Q, then S is guaranteed to reach a global state satisfying P within a finite number of state transitions. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Randomized self-stabilization A system is said to be randomized self-stabilizing system, if and only if it is self-stabilizing and the expected number of rounds needed to reach a correct state (legal state) is bounded by some constant k. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Probabilistic self-stabilization A system S is said to be probabilistically self stabilizing with respect to a predicate P if it satisfies the following two properties: Closure: P is closed under the execution of S. That is, once P is established in S, it cannot be falsified. Convergence: There exists a function f from natural numbers to [0, 1] satisfying limk  ∞ f(k) = 0, such that the probability of reaching a state satisfying P, starting from an arbitrary global state within k state transitions, is 1 – f(k). INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Issues in design of self-stabilization algos Number of states in each of the individual units in a distributed system. Uniform and non-uniform algorithms. Central and distributed demons. Reducing the number of states in a token ring. Shared memory models. Mutual exclusion. Costs of self-stabilization. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Dijkstra’s self-stabilizing token ring A legitimate state must satisfy the following constraints: There must be at least one privilege in the system (liveness or no deadlock). Every move from a legal state must again put the system into a legal state (closure). During an infinite execution, each machine should enjoy a privilege an infinite number of times (no starvation). Given any two legal states, there is a series of moves that change one legal state to the other (reachability). INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Dijkstra’s self-stabilizing token ring Dijkstra considered a legitimate (or legal) state as one in which exactly one machine enjoys the privilege. This corresponds to a form of mutual exclusion, because the privileged process is the only process is the only process that is allowed in its critical section. Once the process leaves the critical section, it passes the privilege to one of its neighbors. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

First solution For any machine, we use the symbols S, L, and R to denote its own state of the left neighbor and the state of the right neighbor on the ring, respectively. The exceptional machine: If L = S then S := (S + 1) mod K End If; The other machine: If L ≠ S then S := L End if; INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Second Solution The second solution uses only three-state machines. The state of each machine is in {0, 1, 2}. The bottom machine, machine 0: If (S + 1) mod 3 = R then S := (S – 1) mod 3 The top machine, machine n – 1: If L = R and (L + 1) mod 3 ≠ S then S := (L + 1) mod 3 INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Second Solution Continued The other machines: If (S + 1) mod 3 = L then S := L If (S + 1) mod 3 = R then S := R INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

If s = 0 and r = 1, then the state of s is changes to 2. The condition (s + 1) mod 3 covers the three possible states; for s = 0, 1, 2, we have (s + 1) mod 3 = 1, 2, 0. These result in the following three possibilities: If s = 0 and r = 1, then the state of s is changes to 2. If s = 1 and r = 2, then the state of s is changes to 0. If s = 2 and r = 0, then the state of s is changes to 1. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

The top machine, machine n – 1, behaves as follows: If L = R and (L = 1) mod 3 ≠ S then S := (L + 1) mod 3 The state of the top machine depends upon both its left and right neighbors (the bottom machine). The condition specifies that the left neighbor (L) and the right neighbor (R) should be in the same state and (L + 1) mod 3 should not be equal to S. (Note that (L + 1) and 3 is 1, 2, 0 when L is 0, 1, 2, respectively). Thus the state of the top machine is as follows: 1, when its left neighbor is 0. 2, when its left neighbor is 1. 0, when its left neighbor is 2. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

All other machines behave as follows: If (S + 1) mod 3 = L then S := L If (S + 1) mod 3 = R then S := R While finding out the state of the other machines (machines 1 and 2 in the example below), we first compare the state of a machine with its left neighbor: If s = 0 and L = 1, then s = 0. If s = 1 and L = 2, then s = 2. If s = 2 and L = 0, then s = 1. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Special networks Ghosh found that there are special networks, where the number of states required by each processor is two. Ghosh’s solution All nodes (machines) in the network shown in Figure require only two states. However, a node needs to use information from all of its neighbors. Let s[i] denote the state of machine i. There are two possible states for each machine, 0 and 1. In the algorithms let b denote an rbitrary state (0 or 1) and denote the complementary state of b INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

For machine 0: If (s[0], s[1]) = ( , b) then s[0] := b For machine 2n – 1: If (s[2n - 1], s[2n - 2]) = (b, b) then s[2n - 1]: = For even numbered machines: If (s[2i - 2], s[2i - 1], s[2i], s[2i + 1]) = (b, b, , b) then s[2i]: = b For odd numbered machines: If (s[2i - 2], s[2i -1], s[2i], s[2i + 1]) = (b, b, b, ) then s[2i - 1]: = ~ b ~ b ~ b ~ b ~ b INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Dolev’s Self Stabilizing Spanning Tree Variables: no_neighbors = Number of processor’s neighbors i = the writing processor m = for whom the data is written lrji (local resgister rji ) the last value of rji read by Pi Root Node: {do forever} While TRUE do for m := 1 to no_neighbors do write lrim := <0, 0> end INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Dolev’s Self Stabilizing Spanning Tree other Nodes: {do forever} While TRUE do for m := 1 do no_neighbors do lrmi := read (lrmi) firstFound := false dist := 1 + min(lrmi.dist)  m: 1≤ m ≤ no_neighbors for m :=1 to no_neighbors do if not FirstFound and lrmi.dis = dist – 1 then write rim := <1, dist> FirstFound := true else write rmi := <0, dist> end INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR