p - Verimag

Snap-Stabilization in
Message-Passing Systems
Sylvie Delaët
(LRI)
Stéphane Devismes
Mikhail Nesterenko
(CNRS, LRI)
(Kent State University)
Sébastien Tixeuil (LIP6)
Preliminaries
<How old are you, Captain?>
<I’m 55>
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
2
From an arbitrary initial configuration?
(after some transient failures)
?
<How old are you, Captain?>
<I’m 12>
?
+ unreliable asynchronous but FIFO links
(induces problems of duplicates)
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
3
Solutions
• Self-Stabilization [Dijkstra 1974]:
• Starting from any configuration, the protocol resumes a
correct behavior in finite time
• Starting from any configuration, If Tintin sends
infinitely many questions to Captain Haddock,
then:
• Tintin receives infinitely many good answers
• Tintin eventually only takes the good answers into account
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
4
Solutions
• Snap-Stabilization [Bui et al,1999]:
• Starting from any configuration, every computation of the
protocol that is started returns a correct result
• Starting from any configuration, if Tintin sends
a question to Captain Haddock, then:
• Tintin eventually receives good answers
• Tintin takes only the good answers into account
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
5
Related Works
(reliable communication in self-stabilization)
• [Gouda & Multari, 1991]
 Deterministic + Unbounded Capacity => Infinite
Counter
 Deterministic + Bounded Capacity => Finite
Counter
• [Afek & Brown, 1993]
 Probabilistic + Unbounded Capacity + Finite
Counter
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
6
Related Works
(self-stabilization in message-passing)
• [Varghese, 1993]
 Deterministic + Bounded Capacity
• [Katz & Perry, 1993]
 Unbounded Capacity, deterministic, infinite
counter
• [Delaët et al]
 Unbounded Capacity, deterministic, finite memory
 Silent tasks
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
7
Related Works
(snap-stabilization)
• Nothing in the Message-Passing Model
• Only in State Model:
 Locally Shared Memory
 Composite Atomicity
• [Cournier et al, 2003]
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
8
Snap-Stabilization in
Message-Passing Systems
Case 1: unbounded capacity links
• Impossible for safety-distributed specifications
 E.g. Mutual Exclusion
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
10
Case Study: Mutual Exclusion
• Specification of the Mutual Exclusion:
 Any process that requests the CS enters in the
CS in finite time (Liveness)
 If a requesting process enters in the CS, then it
executes the CS alone (Safety)
N.b. Some non-requesting processes may be initially in the CS
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
11
Case Study: Mutual Exclusion
• Let p, q be two distinct processes
p
q
p
q
p
q
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
12
Case 2: bounded capacity links
• Case Study: Single-Message Capacity
0 or 1 message
0 or 1 message
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
13
Case 2: bounded capacity links
• Sequence number State  {0,1,2,3,4}
<0,NeigStatep,Qp,Ap>
<1,
p
q
<Stateq,0,Qq,Aq>
Statep
0
1
NeigStatep
?
07/02/2008
Stateq
?
NeigStateq
?
0
Until Statep = 4
Séminaire "Algorithmique Répartie", LIP6
14
Case 2: bounded capacity links
• Pathological Case:
<3,NeigState
<2,?,?,?>
p,Qp,Ap>
p
q
<State
<?,1,?,?>
?,2,?,?>
?,0,?,?>
q,3,Qq,Aq>
Statep
4
2
03
1
Stateq
?
NeigStatep
?
NeigStateq
1
2
3
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
15
Generalizations
• Arbitrary Bounded Capacity
• PIF in fully-connected network
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
16
Application
Mutual Exclusion
in a fully-connected & identified network
using the PIF
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
17
Mutual Exclusion
• Specification:
 Any process that requests the CS enters in the CS in
finite time (Liveness)
 If a requesting process enters in the CS, then it executes
the CS alone (Safety)
N.b. Some non-requesting processes may be initially in the CS
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
18
Principles (1/3)
•
Let L be the process with the smallest ID
•
L decides using ValueL which process can enter
in the CS
•
When a process learns that it is authorized by L
to access the CS:
07/02/2008
1.
It ensures that no other process can execute the CS
2.
3.
It executes the CS, if it requests it
It notifies the leader when it terminates Step 2
Séminaire "Algorithmique Répartie", LIP6
19
Principles (2/3)
• Each process sequentially executes 4
phases infinitely often
• A requesting process can enter in the
CS only after executing Phases 1 to 3
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
20
Principles (3/3)
For a process p:
• Phase 1: p evaluates the IDs using a PIF
• Phase 2: p asks if Valueq = p to each other process q (PIF)
• Phase 3: If Winner(p) then p broadcasts EXIT to every
other process (PIF)
• Phase 4: If Winner(p) then CS; p broadcasts EXITCS (PIF)
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
21
Conclusion
Snap-Stabilization in message-passing is
no more an open question
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
22
Extension
• Apply snap-stabilization in message-passing to:
 Other topologies
 Other problems
 Other failure patterns
07/02/2008
Séminaire "Algorithmique Répartie", LIP6
23
Thank you