Self-Stabilization in Distributed Systems Course: Distributed - - PowerPoint PPT Presentation

self stabilization in distributed systems
SMART_READER_LITE
LIVE PREVIEW

Self-Stabilization in Distributed Systems Course: Distributed - - PowerPoint PPT Presentation

Self-Stabilization in Distributed Systems Course: Distributed Computing Faculty: Dr. Rajendra Prasath Spring 2019 About this topic This course covers various concepts in Self- Stabilization in Distributed Systems. We will also focus on the


slide-1
SLIDE 1

Self-Stabilization in Distributed Systems

Course: Distributed Computing Faculty: Dr. Rajendra Prasath

Spring 2019

slide-2
SLIDE 2

About this topic

This course covers various concepts in Self- Stabilization in Distributed Systems. We will also focus on the essential aspects of self-stabilization in distributed contexts 2

Rajendra, IIIT Sri City

slide-3
SLIDE 3

What did you learn so far? What did you learn so far?

è Challenges in Message Passing systems è Distributed Sorting è Space-Time Diagram è Partial Ordering / Causal Ordering è Concurrent Events è Local Clocks and Vector Clocks è Distributed Snapshots è Termination Detection è Topology Abstraction and Overlays è Leader Election Problem in Rings è Message Ordering / Group Communications è Distributed Mutual Exclusion Algorithms

RECAP

Rajendra, IIIT Sri City

3

slide-4
SLIDE 4

Topics to focus on

  • pics to focus on …

è Distributed Mutual Exclusion è Deadlock Detection è Check Pointing and Rollback Recovery

è Self-Stabilization

è Distributed Consensus è Peer – to – peer computing and Overlays è Authentication in Distributed Systems

For End Semester

Rajendra, IIIT Sri City

4

slide-5
SLIDE 5

Self-Stabilization in Distributed Systems

Let us explore Self-Stabilization algorithms in Distributed Systems

Rajendra, IIIT Sri City

5

slide-6
SLIDE 6

Handling F Handling Failur ailures / Recovery? es / Recovery?

è Failure of a site/node in a distributed system causes inconsistencies in the state of the system. è Recovery: bringing back the failed node in step with other nodes in the system. è Failures: è Process failure: è Deadlocks, protection violation, erroneous user input, etc. è System failure: è Failure of processor/system. System failure can have full/partial amnesia. è It can be a pause failure (system restarts at the same state it was in before the crash) or a complete halt. è Secondary storage failure: data inaccessible. è Communication failure: network inaccessible.

6

Rajendra, IIIT Sri City

slide-7
SLIDE 7

Consistent Checkpoints Consistent Checkpoints

è Overcoming domino effect and livelocks: checkpoints should not have messages in transit. è Consistent checkpoints: no message exchange between any pair of processes in the set as well as

  • utside the set during the interval spanned by

checkpoints. è {x1,y1,z1} is a strongly consistent checkpoint 7

Rajendra, IIIT Sri City

X Y Z x1 y1 z1 x2 x3 y2 z2 m

slide-8
SLIDE 8

Types of ypes of CP CP-RR

  • RR Algorithms

Algorithms

è Synchronous Algorithm

è Two Phase algorithm proposed by Koo and Toueg

è Asynchronous Algorithm

è A simple algorithm proposed by Juang & Venkatesan

8

Rajendra, IIIT Sri City

slide-9
SLIDE 9

Overview Overview

è Self-Stabilizing (SS) Systems

è Legitimate / Illegitimate states è System Model è Token Ring System

è Dijkstra's Self-stabilizing Algorithm è Construct Breadth-First Trees (BFT)

è Computational Cost è Fault Tolerance / Factors Preventing SS è Limitations of SS systems

9

Rajendra, IIIT Sri City

slide-10
SLIDE 10

Intr Introduction

  • duction

è Legitimate State – Systems behave correctly as it has expected to. è Illegitimate State – inactive state or state in which the system misbehaves (Message is lost) è Self – Stabilization – A concept of fault-tolerance in distributed computing è Regardless of initial state, system is guaranteed to converge to a legitimate state in a finite amount of time without any outside intervention è Problem – Nodes do not have a global memory

10

Rajendra, IIIT Sri City

slide-11
SLIDE 11

Definition Definition

A system is self-stabilizing if and only if: è Convergence: Starting from any state, it is guaranteed that the system will eventually reach a correct state è Closure: Given that the system is in a correct state, it is guaranteed to stay in a correct state, provided that no fault happens è A system is said to be randomized self-stabilizing if and only if it is self-stabilizing and the expected number of rounds needed to reach a correct state is bounded by some constant k

11

Rajendra, IIIT Sri City

slide-12
SLIDE 12

System Model System Model

è An abstract computer model: state machine. è A distributed system model comprises of a set of n state machines called processors that communicate with each other, which can be represented as a GRAPH è Message passing communication model:

è queue(s) Qij, for messages from Pi to Pj

è System configuration is set of states, and message queues. è In any case it is assumed that the topology remains connected, i.e., there exists a path between any two nodes.

12

Rajendra, IIIT Sri City

slide-13
SLIDE 13

Tok

  • ken Rings

en Rings

è Dijkstra's Self-Stabilizing Token Ring System

è When a machine has a privilege, it is able to change its current state, which is referred to as a move. è 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). Dijkstra considered a legitimate (or legal) state as one in which exactly one machine enjoys the privilege

13

Rajendra, IIIT Sri City

slide-14
SLIDE 14

Dijkstr Dijkstra's a's Algorithm Algorithm

è For any machine:

è S – State of its own è L – State of the left neighbor and è R - State of the right neighbor on the ring

è The exceptional machine:

è If L = S then S = (S+1) mod K;

è All other machines:

è If L = S then S = L;

14

Rajendra, IIIT Sri City

slide-15
SLIDE 15

Dijkstr Dijkstra's a's Algorithm Algorithm

è A Privilege of a machine is able to change its current state on a Boolean predicate that consists of its current state and the states of its neighbors è When a machine has a privilege, it is able to change its current state, which is referred to as a move.

Second solution (K = 3)

è 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;

è The other machines:

è If (S+1) mod 3 = L then S = L;

15

Rajendra, IIIT Sri City

slide-16
SLIDE 16

An Illustr An Illustration ation

è 4 Machines: M0, M1, M2, and M3 16

Rajendra, IIIT Sri City

slide-17
SLIDE 17

Fault ault Toler

  • lerance

ance

A Self-Stabilizing System handles Transient faults: è Inconsistent Initialization: Different processes initialized to local states that are inconsistent with one another. è Mode of Change: There can be different modes

  • f execution of a system. In changing the mode
  • f operation, it is impossible for all processes to

effect the change in same time. è Transmission Errors: Loss, corruption, or reordering of messages è Memory Crash 17

Rajendra, IIIT Sri City

slide-18
SLIDE 18

Factors P actors Preventing Self-Stabilization eventing Self-Stabilization

Transient faults:

è Symmetry: Processes should not be identical/symmetric because solution generally relies on a distinguished process. è Termination: If any unsafe global state is a final state, system will not be able to stabilize è Isolation: Inadequate communication among processes can lead to local states consistent, however, the resulting global state is not safe! è Look-alike configurations: Such configurations result when the same computation is enabled in two different states with no way to differentiate between them. Then system cannot guarantee convergence from unsafe state

18

Rajendra, IIIT Sri City

slide-19
SLIDE 19

Limitations of Limitations of Self-Stabilizing Self-Stabilizing

è Need for an exceptional machine è Convergence-response tradeoffs

è Convergence span denotes the maximum number of critical transitions made before the system reaches a legal state è Response span denotes the maximum number of transitions to get from the starting state to some goal state è Critical Transitions. (ex. A process moves into a critical section, while another is already in!)

19

Rajendra, IIIT Sri City

slide-20
SLIDE 20

Limitations of Limitations of Self-Stabilizing ( Self-Stabilizing (contd contd) )

è Pseudo-stabilization: Weaker, but less expensive with respect to self-stabilization.

è Every computation only needs to have some state such that the suffix of the computation beginning at this state is in the set of legal computations.

è Verification of self-stabilizing system

è Verification may be difficult. è Stair method developed; Proving the algorithm stabilizes in each step verifies correctness of the entire algorithm, where interleaving assumptions are relaxed

20

Rajendra, IIIT Sri City

slide-21
SLIDE 21

Costs of Costs of Self-Stabilization Self-Stabilization

è Assessment of cost factor

è Convergence Span: The maximum number of transitions that can be executed in a system, starting from an arbitrary state, before it reaches a safe state. è Response Span: The maximum number of transitions that can be executed in a system to reach a specified target state, starting from some initial state. The choice of initial state and target state depends upon the application

21

Rajendra, IIIT Sri City

slide-22
SLIDE 22

Inter Interesting esting Algorithms Algorithms

è Breadth-First Trees (Huang and Chen, 1992)

è All-pairs shortest path problem (Chandrasekar and Srimani, 1994) è Finding centers and medians of trees (Bruell et al. 1999) è Shortest path problem (Huang and Lin, 2002) è Shortest path problem assuming read/write atomicity (Huang, 2005) è Connected minimal dominating sets (Turau and Hauck, 2009) è Finding efficient sets of graphs and trees (Turau, 2013) è Leader election (Altisen et al., 2017) è Edge monitoring in wireless sensor networks (Neggazi et al., 2017)

22

Rajendra, IIIT Sri City

slide-23
SLIDE 23

Br Breadth-F eadth-First irst Trees ees

è Proposed by Huang and Chen, 1992 è Breadth-First Tree (BFT): A Breadth-First Tree of a connected graph is a spanning tree of the graph in which each node has a minimum distance to the root along the tree edges è How to construct a BFT from a given graph? è How to develop a self-stabilizing algorithm for constructing the Breadth-First Tree? 23

Rajendra, IIIT Sri City

slide-24
SLIDE 24

Self-Stabilizing Self-Stabilizing Algorithm for BFT Algorithm for BFT

è Basics:

è Model a distributed system as a connected graph G(V, E) è A specific node r is selected as the root. è How to build a breadth-first- tree rooted at r from G with each node knowing its level in the tree. è For each node i, let Ni be the set of i’s neighbors è Each node i other than the root maintains the following two local variables:

è L(i): the level of i, è P(i) : the parent of i, where 2 <= L(i) <= n and P(i) in Ni

24

Rajendra, IIIT Sri City

slide-25
SLIDE 25

Self-Stabilizing Self-Stabilizing Algorithm for BFT Algorithm for BFT

è From G, construct BFT rooted at node r è In a tree:

è L(i) = (L(pi) + 1) for any i other than r è L(pi) = min({L(j) | j in Nj }) based on the

property of breadth-first trees.

è The system reaches a legitimate state, when the following predicate is true

BFT = (Vi: i # r: L(i) = L( pi) + 1 ∧ L( pi) = min({L( j) | j in Ni}))

25

Rajendra, IIIT Sri City

slide-26
SLIDE 26

Self-Stabilizing Self-Stabilizing Algorithm for BFT Algorithm for BFT

è For any node i, if L(i) <= L(pi), we call node i an L- turn node, or more specifically a k-turn node, where k = L(i). Also let tk be the number of all the k-turn nodes in the system è Define F1 as follows: F1 ≡ (t2, t3 , . . . , tn) è Compare the values of F1 is by lexicographical order è Based on lexicographical order, (a1, a2 , . . . ) > (b1, b2 , . . .) if there exists some k such that ai = bi, 1 <= i < k, and ak > bk

26

Rajendra, IIIT Sri City

slide-27
SLIDE 27

Self-Stabilizing Self-Stabilizing Algorithm for BFT Algorithm for BFT

è Define F2 as follows:

F2 ≡ ∑ ( L(i) + L(pi) )

i, i # r è That is, for each node i other than the root, it contributes two values to F2: one is the level of itself and the other is the level of its parent 27

Rajendra, IIIT Sri City

slide-28
SLIDE 28

Summary Summary

è State of Machines è Legitimate / Illegitimate States è Self-Stabilizing Algorithms

è Dijkstra’s algorithm (token rings) è Constructing a Breadth First Tree

è Fault Tolerance è Costs of self-stabilization

è Stay tuned ... More to come up … !!

Rajendra, IIIT Sri City

28

slide-29
SLIDE 29

How to r How to reach me? each me?

è Please leave me an email:

rajendra [DOT] prasath [AT] iiits [DOT] in

è Visit my homepage @

è http://www.iiits.ac.in/FacPages/index- rajendra.html OR è http://rajendra.2power3.com 29

Rajendra, IIIT Sri City

slide-30
SLIDE 30
  • Perspective Students (having CGPA above 8.5

and above)

  • Promising Students (having CGPA above 6.5

and less than 8.5)

  • Needy Students (having CGPA less than 6.5)
  • Can the above group help these students? (Your

work will also be rewarded)

  • You may grow a culture of collaborative

learning by helping the needy students

Help among Yourselves?

30

Rajendra, IIIT Sri City

slide-31
SLIDE 31

… Questions ???

Thanks …

Rajendra, IIIT Sri City

31