Self Stabilization 1 Goals of the lecture: Self-stabili - - PowerPoint PPT Presentation

self stabilization 1 goals of the lecture self stabili
SMART_READER_LITE
LIVE PREVIEW

Self Stabilization 1 Goals of the lecture: Self-stabili - - PowerPoint PPT Presentation

Self Stabilization 1 Goals of the lecture: Self-stabili zation F ault-tolerance Denition of self-stabilizing Algo rithm with K -state Machines Pro of Algo rithm with 3 -state Machines Pro


slide-1
SLIDE 1 Self Stabilization 1 Goals
  • f
the lecture: Self-stabili zation
  • F
ault-tolerance
  • Denition
  • f
self-stabilizing
  • Algo
rithm with K
  • state
Machines
  • Pro
  • f
  • Algo
rithm with 3-state Machines
  • Pro
  • f
References: Dijkstra 74, Dijkstra 86 c Vija y K. Ga rg Distributed Systems F all 94
slide-2
SLIDE 2 Self Stabilization 2 F ault-tolerance
  • systems
which recover from faults
  • self-stabilization:
highly fault-tolerant
  • a
fault can change any data
  • system
view ed as consisting
  • f
legal and illegal states
  • self-stabilzation:
should reach a legal state in nite moves c Vija y K. Ga rg Distributed Systems F all 94
slide-3
SLIDE 3 Self Stabilization 3 T erminolo gy
  • Underlying
top
  • logy:
connection graph
  • neighb
  • rs
  • p
rivilege: b
  • lean
function
  • f
  • wn
state,
  • states
  • f
its neighb
  • rs
  • legal
state: application dep endent c Vija y K. Ga rg Distributed Systems F all 94
slide-4
SLIDE 4 Self Stabilization 4 Requirements
  • n
legal state
  • In
each legal state,
  • ne
  • r
mo re p rivileges
  • any
move from a legal state leads to a legal state
  • each
p rivilege p resent in at least
  • ne
legal state
  • fo
r any pair
  • f
legal states, there exist a sequence
  • f
trans- ferring moves Denition
  • f
self-stabilzati
  • n:
Rega rdless
  • f
initial state, and p rivilege selected each time, the system is gua ranteed to reach a legal state after a nite numb er
  • f
moves. c Vija y K. Ga rg Distributed Systems F all 94
slide-5
SLIDE 5 Self Stabilization 5 Example: Mutual Exclusion legal state: exactly
  • ne
p rivilege
  • N+1
machines numb ered 0..N
  • L,S,R:
states
  • f
left, self, right
  • b
  • ttom
machine: machine
  • fo
rmat: if p rivilege then co rresp
  • nding
move
  • c
Vija y K. Ga rg Distributed Systems F all 94
slide-6
SLIDE 6 Self Stabilization 6 Algo rithm I: K
  • state
machine (K > N ) Bottom: if (L=S) then S := S+1 mo d K
  • F
  • r
  • ther
machines: if (L 6= S ) then S := L
  • c
Vija y K. Ga rg Distributed Systems F all 94
slide-7
SLIDE 7 Self Stabilization 7 Example t t t t t t B 3 3 1 4 2 4 ) t t t t t t B 4 3 1 4 2 4 ) t t t t t t B 4 4 2 4 2 4 + t t t t t t B 4 4 4 4 2 4 ( t t t t t t B 4 4 4 4 4 4 ( t t t t t t B 5 4 4 4 4 4 c Vija y K. Ga rg Distributed Systems F all 94
slide-8
SLIDE 8 Self Stabilization 8 Pro
  • f
Lemma 0: If the system is in a legal state, then it will sta y legal. Lemma 1: A sequence
  • f
moves in which Bottom do es not move is nite. Lemma 2: Given any conguration, either (1) no
  • ther
machine has the same state as the b
  • ttom,
  • r
(2) there exists a value which is dierent from all machines. Lemma 3: With in a nite numb er
  • f
moves, pa rt
  • ne
  • f
Lemma 2 will b e true. Theo rem 1: Within nite numb er
  • f
moves, the system will reach a legal state. c Vija y K. Ga rg Distributed Systems F all 94
slide-9
SLIDE 9 Self Stabilization 9 Algo rithm I I: 3-state machine Ring
  • f
at least 3 machines Bottom: B, No rmal: N, T
  • p:
T conguration view ed as a string
  • f
0,1,2 Bottom: if (B + 1 = R ) then B := B + 2; No rmal: if (L = S + 1)
  • r
(R = S + 1) then S := S + 1; T
  • p:
if (L = B ) and (T 6= B + 1) then T := B + 1 c Vija y K. Ga rg Distributed Systems F all 94
slide-10
SLIDE 10 Self Stabilization 10 Viewing the string with a rro ws y = #
  • f
left-p
  • inting
+ 2#
  • f
right-p
  • inting
Bottom : (0) B R to B ! R y = +1 No rmal Machine: (1) L ! S R to L S ! R y = (2) L S R to L S R y = (3) L ! S R to L S R y = 3 (4) L ! S ! R to L S R y = 3 (5) L S R to L ! S R y = T
  • p
Machine (p rivilege also dep ends
  • n
B): (6) L ! T to L T y = +1 (7) L T to L T y = +1 c Vija y K. Ga rg Distributed Systems F all 94
slide-11
SLIDE 11 Self Stabilization 11 Example z z z z B T 1 2 ! ! z z z z B T 1 1 2 z z z z B T 1 2 2 z z z z B T 2 2 ! z z z z B T 2 ! z z z z B T z z z z B T 1 c Vija y K. Ga rg Distributed Systems F all 94
slide-12
SLIDE 12 Self Stabilization 12 Pro
  • f
Claim: Single a rro w implies it sta ys that w a y . Claim: string free from a rro w creates
  • ne
in a single move. No w sho w that if multiple a rro w then y will b e decreased in nite moves. c Vija y K. Ga rg Distributed Systems F all 94
slide-13
SLIDE 13 Self Stabilization 13 Pro
  • f
contd Lemma 0: Bet w een t w
  • successive
moves
  • f
T
  • p
at least
  • ne
move
  • f
Bottom tak es place. Lemma 1: A sequence
  • f
moves in which Bottom do es not move is nite. Pro
  • f:
sucient to consider no rmal machines. (3),(4),(5) decrease numb er
  • f
a rro ws. (1) and (2) moves nite due to top
  • logy
. Theo rem: Within nite moves, there is
  • ne
a rro w in the string. Pro
  • f:b
et w een successive moves
  • f
b
  • ttom,
falsication
  • f
\left- most a rro w exists and p
  • ints
to the right" happ en in (3), (4),
  • r
(6). if (6) then done. If (3)
  • r
(4), y decreases b y 3. y can increase b y at most 2 p er move
  • f
Bottom, thus y is decreased b y 1. c Vija y K. Ga rg Distributed Systems F all 94