Title: Distributed Algorithms Chapter 3 Phase Synchronization on undirected trees
1Distributed AlgorithmsChapter 3Phase
Synchronization on undirected trees
2The problem
Given a undirected tree of sites.
each site a alternates between the states busy
and pending.
Def. a site a is in its k-th phase if a is its
k-th time busy. The algorithm is to
guarantee if two sites are busy at the same
time, they are in the same phase.
3algorithmic idea
Each phase synchronization is started by the busy
leaves, l Each l sends a message to its unique
neighbour and goes pend.
a busy site informed by all but one neighbour,
informs the remaining neighbour and goes pending
a pending site informed by the remaining
neighbour, informs all other neighbours and goes
busy.
4The algorithm
5A surprizing observation
- a network
- A__________ B __________C
- occurrence sequence orde of variables (x,y,i)
-
(A,0) (B,0) (C,0)
6A surprizing observation
- a network
- A__________ B __________C
- occurrence sequence orde of variables (x,y,i)
- a(A,B,0)
(B,0) (C,0)
(A,B,0)
7A surprizing observation
- a network
- A__________ B __________C
- occurrence sequence orde of variables (x,y,i)
- a(A,B,0) a(B,C,0)
(C,0)
(A,B,0) (B,C,0)
8A surprizing observation
- a network
- A__________ B __________C
- occurrence sequence orde of variables (x,y,i)
- a(A,B,0) a(B,C,0) a(C,B,0)
(A,B,0) (B,C,0) (C,B,0)
9A surprizing observation
- a network
- A__________ B __________C
- occurrence sequence orde of variables (x,y,i)
- a(A,B,0) a(B,C,0) a(C,B,0) b(C,B,0)
(C,1)
(A,B,0) (B,C,0)
10A surprizing observation
- a network
- A__________ B __________C
- occurrence sequence orde of variables (x,y,i)
- a(A,B,0) a(B,C,0) a(C,B,0) b(C,B,0)
(C,1)
(A,B,0) (B,C,0)
11A surprizing observation
- a network
- A__________ B __________C
- occurrence sequence orde of variables (x,y,i)
- a(A,B,0) a(B,C,0) a(C,B,0) b(C,B,0) a(C,B,1)
two copies of the token (B,C) at messages
(A,B,0) (B,C,0) (C,B,1)
12A non trivial invariant
- Let a, b, a, b, U ? ? ? ?(U ? U) with
- a(u,n) def 2n r(u) b(u,n) def 2n
r(u) - a(u,n) def 2n r(u) b(u,n) def 2n
r(u) - a place invariant
- a(busy) messages b(pr1,3(pending))
- a(busy) messages b(pr1,3(pending))
helps to prove if busy.(u,i) and busy.(v,j)
then ij. if busy.(u,i) then eventually
busy.(u,i1)
13Distributed Algorithms End of Chapter 3Phase
Synchronization on undirected trees