Transcript Document
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 Classic Diners • (classic) dining philosophers (diners) classic diners topology defined as follows each process has a set of neighbor a processes this defines the (arbitrary) topology of the system c b a and b conflict neighbors they are communication neighbors processes periodically request access wireless networks: hidden terminal effect 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 a c b radio range 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 assumes that conflict neighbors are subset of communication neighbors many problems may not be easily modeled more complicated if directional antennas b a c d 11/18/2006 SSS 2 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(34):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. 11/18/2006 SSS 3 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 to generic diners similar design scheme – each process requests the CS when in CS contention releases the CS when done conflict neighborhood of a a c d b e direct implementation maintain logical channels between communication neighbors apply classic diners on top of logical independent channels to c, d, and e reuse link (a,b) topology such program may not be efficient if logical channels reuse links • is there a more efficient (self-stabilizing) deterministic solution to generalized diners ? 11/18/2006 SSS 4 Outline Solution to Generalized Diners • main concepts conflict tree formation conflict resolution fairness preservation • details • example operation • proof method • extensions 11/18/2006 SSS 5 Conflict Tree Formation KIDS.b M.a h dad.b a c b e f g d • for each process a form a spanning tree of its conflict neighbor set M.a to route message exchanges 11/18/2006 SSS 6 Multiple Conflict Trees M.f a M.a c b KIDS.b h d dad.b c a e h f g c a e f g e f g b hd b d • 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) 11/18/2006 SSS 7 Conflict Resolution M.f state.a.f=idle a a may enter CS e h c state.f.f=idle f b g state.h.a=req h M.a state.a.a=req a e d c b d g f • a joins CS contention by propagating request along its conflict tree • when a learns that all conflict neighbors notified, a enters the CS if higher priority conflict neighbors (f >a) are idle this guarantees MX 11/18/2006 SSS 8 Fairness Preservation M.f state.a.f=req a f YIELD.a e h c state.f.f=req f b g state.h.a=req h M.a state.a.a=req a e d c b d g f 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 11/18/2006 SSS 9 Outline Solution to Generalized Diners • main concepts conflict tree formation conflict resolution fairness preservation • details • example operation • proof method • extensions 11/18/2006 SSS 10 Model & Functions execution model • shared registers • asynchronous • high atomicity program parts • own CS request management • neighbor request propagation 11/18/2006 SSS 11 Outline Solution to Generalized Diners • main concepts conflict tree formation conflict resolution fairness preservation • details • example operation • proof method • extensions 11/18/2006 SSS 12 Example Operation rep req idle c a b d a joins the CS contention 11/18/2006 SSS 13 Example Operation rep req a c idle b d c propagates a’s request 11/18/2006 SSS 14 Example Operation rep req a c idle b d b propagates a’s request 11/18/2006 SSS 15 Example Operation rep req a c b idle d d propagates a’s request 11/18/2006 SSS 16 Example Operation rep req a c b d idle d initiates reply back to a 11/18/2006 SSS 17 Example Operation rep req d a c b idle b propagates reply 11/18/2006 SSS 18 Example Operation rep req b a d c idle c propagates reply 11/18/2006 SSS 19 Example Operation rep req c b d a idle • a enters the CS if higher priority processes are idle, records lower priority conflict neighbors in CS contention 11/18/2006 SSS 20 Example Operation rep c b d req idle a c resets, a has to wait if has new request 11/18/2006 SSS 21 Example Operation rep b d req idle a c • a may now proceed 11/18/2006 SSS 22 Example Operation rep req idle 11/18/2006 b d a c SSS 23 Outline Solution to Generalized Diners • main concepts conflict tree formation conflict resolution fairness preservation • details • example operation • proof method • extensions 11/18/2006 SSS 24 Proof Method • stabilization is proven by stating the program invariant and showing convergence by analyzing the state transitions stop.b I’.b back.d stop.d P’.b • safety follows from the invariant P.b • liveness requires several inductions stop.b I.b on the conflict tree depth and process identifier space R.b join.a i) IR’.a stop.e IR.a intermediate process b if Inv holds for ancestors RR.a enter.a ii) root process a 11/18/2006 SSS 25 Outline Solution to Generalized Diners • main concepts conflict tree formation conflict resolution fairness preservation • details • example operation • proof method • extensions 11/18/2006 SSS 26 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 11/18/2006 SSS 27 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) can concurrently enter CS a c b e f g h d 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 11/18/2006 SSS 28 Future Directions • tolerance to Byzantine faults • on-the-fly tree constructions enables snap-stabilization • resource bounds exploration 11/18/2006 SSS 29