self-stabilizing philosophers with generic conflicts praveen danturi mikhail nesterenko sébastien...

29
Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization, Safety, and Security of Distributed Systems November 18, 2006

Upload: laura-snow

Post on 18-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

Self-Stabilizing Philosophers with Generic Conflicts

Praveen Danturi

Mikhail Nesterenko

Sébastien Tixeuil

Eighth International Symposium on Stabilization, Safety, and Security of Distributed Systems

November 18, 2006

Page 2: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

211/18/2006 SSS

• (classic) dining philosophers (diners) defined as follows

each process has a set of neighbor processes

this defines the (arbitrary) topology of the system

processes periodically request access to the CS

solution has to satisfy two properties

safety – no two conflict neighbors are in the CS at the same time

liveness – every requesting process eventually enters the CS

• classic diners assumes that conflict neighbors are subset of communication neighbors

many problems may not be easily modeled

classic diners topology

a and b conflict neighbors they are communication neighbors

wireless networks: hidden terminal effect

a and b mutually out of range when send to c cause collision: a and b compete for CS (c’s antenna) while unable to directly communicate

Classic Diners

ca b

ca b

radio range

ab

c

d

more complicated if directional antennas

Page 3: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

311/18/2006 SSS

Existing SS Diners and Related Lit.

SS deterministic diners

[AS99] G. Antonoiu and P.K. Srimani. Mutual exclusion between neighboring nodes in an arbitrary system graph that stabilizes using read/write atomicity. EuroPar’99

[BDGM00] J. Beauquier, A.K. Datta, M. Gradinariu, and F. Magniette. Self-stabilizing local mutual exclusion and daemon refinement. DISC’00

[BPV04] C. Boulinier, F. Petit, and V. Villain. When graph theory helps self-stabilization. PODC’04

[CDP03] S. Cantarell, A.K. Datta, and F. Petit. Self-stabilizing atomicity refinement allowing neighborhood concurrency. SSS’03

[DGR05] A.K. Datta, M. Gradinariu, and M. Raynal. Stabilizing mobile philosophers. IPL 2005

[GH99] M.G. Gouda and F. Haddix. The linear alternator. WSS’99

[HG05] F.Haddix and M.G. Gouda. A general alternator. PDCS’05 409-413

[H00] S.T. Huang. The fuzzy philosophers. IPDPS’00 Workshop

[KY02] H. Kakugawa and M. Yamashita. Self-Stabilizing Local Mutual Exclusion on Networks in which Process Identifiers are not Distinct. SRDS’02

[JADT02] C. Johnen, L.O. Alima, A.K. Datta, and S. Tixeuil. Optimal snap-stabilizing neighborhood synchronizer in tree networks. PPL 12(3- 4):327-340, 2002.

[MN98] M. Mizuno and M. Nesterenko. A transformation of self-stabilizing serial model programs for asynchronous parallel computing environments. IPL, 66(6):285-290, 1998

[NA02] M. Nesterenko and A. Arora. Stabilization-preserving atomicity refinement. JPDC, 62(5):766-791, 2002.

Other related[AK05] M. Arumugam and S.S. Kulkarni. Self-stabilizing deterministic TDMA for sensor networks. ICDCIT’05

[G+04] M. Gairing, W. Goddard, S.T. Hedetniemi, P. Kristiansen, and A.A. McRae. Distance-two information in self-stabilizing algorithms. PPL, 14(3-4):387-398, 2004.

[G+06] W. Goddard, S.T. Hedetniemi, D.P Jacobs, and V Trevisan. Distance-k information in self-stabilizing algorithms, SIROCCO’06.

[HT04] T.Herman and S.Tixeuil. A distributed TDMA slot assignment algorithm for wireless sensor networks. AlgoSensors’04

[KA03] S.S. Kulkarni and M. Arumugam. Collision-free communication in sensor networks. SSS’03

[MFGST06] N. Mitton, E. Fleury, I. Guérin-Lassous, B. Sericola, and S.Tixeuil. On fast randomized colorings in sensor networks. ICPADS’06.

Page 4: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

411/18/2006 SSS

conflict neighborhood of a

• is there a more efficient (self-stabilizing) deterministic solution to generalized diners ?

• each process has separate conflict and communication neighbor sets to allow solution, conflict neighbors need to be

reachable through comm. neighbors

• some solutions to classic diners can be adapted togeneric diners

similar design scheme – each process

requests the CS when in CS contention

releases the CS when done direct implementation

maintain logical channels between communication neighbors

apply classic diners on top of logical topology

such program may not be efficient if logical channels reuse links

Generalized Diners

independent channels toc, d, and e reuse link (a,b)

a b

e

c

d

Page 5: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

511/18/2006 SSS

Outline

• main concepts conflict tree formation conflict resolution fairness preservation

• details

• example operation

• proof method

• extensions

Solution to Generalized Diners

Page 6: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

611/18/2006 SSS

Conflict Tree Formation

e

a c b d

f g

h

dad.b

KIDS.b

e

a c b d

f g

hM.a

• for each process a form a spanning tree of its conflict neighbor set M.a to route message exchanges

Page 7: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

711/18/2006 SSS

a c b d

e f g

h

Multiple Conflict Trees

• multiple spanning trees are formed each process (b) maintains a routing tree for all conflict neighbor

sets it is a member of (a and f)

a c b d

e f g

hdad.b

KIDS.bM.aa c b d

e f g

hM.f h

Page 8: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

811/18/2006 SSS

Conflict Resolution

a c b d

e f g

hM.a

a c b d

e f g

hM.f h

state.a.a=req

state.h.a=req

• a joins CS contention by propagating request along its conflict tree

state.a.f=idle

state.f.f=idle

• when a learns that all conflict neighbors notified, a enters the CS if higher priority conflict neighbors (f >a) are idle this guarantees MX

a may enter CS

Page 9: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

911/18/2006 SSS

Fairness Preservation

a c b d

e f g

hM.a

a c b d

e f g

hM.f h

similar to [NA02]• when a enters the CS, remembers lower priority neighbors in CS contention (suppose f < a) in set YIELD.a• a removes f from YEILD.a only after f becomes idle• a cannot request the CS again until f is removed from YIELD.a guarantees fairness

state.a.f=req

state.f.f=req

state.a.a=req

state.h.a=req

f YIELD.a

Page 10: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1011/18/2006 SSS

Outline

• main concepts conflict tree formation conflict resolution fairness preservation

• details

• example operation

• proof method

• extensions

Solution to Generalized Diners

Page 11: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1111/18/2006 SSS

Model & Functions

execution model• shared registers• asynchronous• high atomicity

program parts

• own CS request management

• neighbor request propagation

Page 12: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1211/18/2006 SSS

Outline

• main concepts conflict tree formation conflict resolution fairness preservation

• details

• example operation

• proof method

• extensions

Solution to Generalized Diners

Page 13: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1311/18/2006 SSS

Example Operation

a joins the CS contention

a c b didle

req

rep

Page 14: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1411/18/2006 SSS

Example Operation

c propagates a’s request

a

c b didle

req

rep

Page 15: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1511/18/2006 SSS

Example Operation

b propagates a’s request

a c

b didle

req

rep

Page 16: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1611/18/2006 SSS

Example Operation

d propagates a’s request

a c b

didle

req

rep

Page 17: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1711/18/2006 SSS

Example Operation

d initiates reply back to a

a c b d

idle

req

rep

Page 18: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1811/18/2006 SSS

Example Operation

b propagates reply

a c b

d

idle

req

rep

Page 19: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

1911/18/2006 SSS

Example Operation

c propagates reply

a c

b d

idle

req

rep

Page 20: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2011/18/2006 SSS

Example Operation

• a enters the CS if higher priority processes are idle, records lower priority conflict neighbors in CS contention

a

c b d

idle

req

rep

Page 21: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2111/18/2006 SSS

Example Operation

c resets, a has to wait if has new request

a

c b d

idle

req

rep

Page 22: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2211/18/2006 SSS

Example Operation

• a may now proceed

a c

b d

idle

req

rep

Page 23: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2311/18/2006 SSS

Example Operation

a

c

b d

idle

req

rep

Page 24: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2411/18/2006 SSS

Outline

• main concepts conflict tree formation conflict resolution fairness preservation

• details

• example operation

• proof method

• extensions

Solution to Generalized Diners

Page 25: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2511/18/2006 SSS

• stabilization is proven by stating theprogram invariant and showingconvergence by analyzing the statetransitions

• safety follows from the invariant

• liveness requires several inductionson the conflict tree depth and processidentifier space

Proof Method

P’.b

P.b I.b

R.b

I’.b

i) intermediate process bif Inv holds for ancestors

stop

.dback.b

stop.b

stop.b

back

.d

stop.b

forw

ard.bback.b

IR’.a IR.a RR.a

ii) root process a

stop.e

join.a

enter.a

Page 26: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2611/18/2006 SSS

Outline

• main concepts conflict tree formation conflict resolution fairness preservation

• details

• example operation

• proof method

• extensions

Solution to Generalized Diners

Page 27: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2711/18/2006 SSS

Refining to Low Atomicity & Termination

• implementation in wireless sensor networks each radio channel is a lossy zero-capacity channel

lost messages recovered through acknowledgements/timeouts

broadcast helps efficiency

• termination – no message exchanges if no requests to preserve stabilization in message-passing need to eliminate

illegitimate terminal states difficult (but not impossible) [AN05]

illegitimate state is when child is rep while parent is idle

eliminated through periodic parent notification if child is rep

Page 28: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2811/18/2006 SSS

e

a c b d

f g

h

Drinkers and Unfairness

• classic drinking philosophers problem (drinkers) – to enter the CS process needs only a subset of conflicting resources (this subset may differ with each CS request)

generic diners extends to generic drinkers our program extends to solve generic

drinkers

CS request carries set of conflicting processes

each process in conflict tree maintains a set of each descendants

propagates request only if two sets intersect

• unfair problems – graph coloring, domination, coverage, MIS, irredundant set [G+04, G+06] straightforward simplification – need not yield to lower priority processes

can concurrently enter CS

Page 29: Self-Stabilizing Philosophers with Generic Conflicts Praveen Danturi Mikhail Nesterenko Sébastien Tixeuil Eighth International Symposium on Stabilization,

2911/18/2006 SSS

Future Directions

• tolerance to Byzantine faults

• on-the-fly tree constructions enables snap-stabilization

• resource bounds exploration