Bounds for self-stabilization in unidirectional networks

A distributed algorithm is self-stabilizing if after faults and attacks hit the system and place it in some arbitrary global state, the systems recovers from this catastrophic situation without external intervention in finite time. Unidirectional net…

Authors: ** Samuel Bernard, Stéphane Devismes, Maria Gradinaru Potop‑Butucaru

Bounds for self-stabilization in unidirectional networks
apport d e r e c h e r c h e ISSN 0249-6399 ISRN INRIA/RR--6524--FR+ENG Thème NUM INSTITUT N A TION AL DE RECHERCHE EN INFORMA TIQUE ET EN A UTOMA TIQ UE Bounds for self-stabilization in unidirectional netw orks Samuel Bernard ? — Stéphane De vismes ◦ — Maria Gradinariu Potop-Butucaru ?, † — Sébastien T ixeuil ?, ‡ ? Univ ersité Pierre et Marie Curie - Paris 6, LIP6, France ◦ CNRS, LRI, France † INRIA project-team Regal ‡ INRIA project-team Grand Large N° 6524 May 2008 Unité de recherche INRIA Futurs Parc Club Orsay Uni versité, ZA C des V ignes, 4, rue Jacques Monod, 91893 ORSA Y Cedex (France) Téléphone : +33 1 72 92 59 00 — Télécopie : +33 1 60 19 66 08 Bounds for self-stabilization in unidirectional netw orks Sam uel Bernard ? , St´ ephane Devismes ◦ , Maria Gradinariu P otop-Butucaru ?, † , S´ ebastien Tixeuil ?, ‡ ? Univ ersit´ e Pierre et Marie Curie - P aris 6, LIP6, F rance ◦ CNRS, LRI, F rance † INRIA pro ject-team Regal ‡ INRIA pro ject-team Grand Large Th ` eme NUM — Syst ` emes n um´ eriques Pro jet Grand Large Rapp ort de rec herc he n ° 6524 — May 2008 — 21 pages Abstract: A distributed algorithm is self-stabilizing if after faults and attac ks hit the system and place it in some arbitrary global state, the systems reco v ers from this catastrophic situation without external interv ention in finite time. Unidirec- tional net works preclude many common tec hniques in self-stabilization from b eing used, suc h as preserving lo cal predicates. In this pap er, w e in vestigate the intrinsic complexit y of achieving self-stabilization in unidirectional netw orks, and fo cus on the classical vertex coloring problem. When deterministic solutions are considered, w e pro ve a low er b ound of n states p er pro cess (where n is the netw ork size) and a reco very time of at least n ( n − 1) / 2 actions in total. W e present a deterministic algorithm with matching upp er bounds that p erforms in arbitrary graphs. When probabilistic solutions are considered, we observ e that at least ∆ + 1 states p er pro cess and a reco very time of Ω( n ) actions in total are required (where ∆ denotes the maximal degree of the underlying simple undirected graph). W e presen t a probabilistically self-stabilizing algorithm that uses k states p er process, where k is a parameter of the algorithm. When k = ∆ + 1, the algorithm recov ers in exp ected O (∆ n ) actions. When k may gro w arbitrarily , the algorithm recov ers in expected O ( n ) actions in total. Th us, our algorithm can be made optimal with resp ect to space or time complexity . Key-w ords: self-stabilization, lo wer b ounds, unidirectional netw orks, coloring Bornes p our l’auto-stabilisation dans les r´ eseaux unidirectionnels R ´ esum ´ e : Un algorithme r ´ eparti est auto-stabilisant si, apr` es que des fautes et des attaques aient frapp ´ e le syst ` eme et l’aient plac ´ e dans un ´ etat quelconque, le syst` eme corrige cette situation catastrophique sans in terv en tion ext´ erieure en temps fini. Les r ´ eseaux unidirectionels empˆ ec hent de nombreuses tec hniques habituelles dans le cadre de l’auto-stabilisation d’ˆ etre utilis ´ ees, comme la pr ´ eserv ation de pr ´ edicats lo caux. Dans cet article, nous ´ ev aluons la complexit ´ e in trins ` eque de la r ´ ealisation de l’auto-stabilisation dans les r ´ eseaux unidirectionels, et nous nous concen trons sur le probl ` eme du coloriage de nœuds. Quand les solutions d ´ eterministes son t envisag ´ ees, nous prouv ons qu’il existe une b orne inf´ erieure de n ´ etats par pro cessus (o` u n est la taille du r´ eseau) et un temps minimal a v an t retour ` a la normale de n ( n − 1) / 2 action au total. Nous pr ´ esen tons un algorithme d´ eterministe dans des r ´ eseaux de topologies quelconques qui est optimal en espace et en temps. Dans le cadre de solutions probabilistes, nous observons que ∆ + 1 ´ etats par pro cessus et Ω( n ) actions au total sont requises (o ` u ∆ repr´ esen te le degr ´ e du graphe non-orien t ´ e sous-jacen t). Nous pr´ esen tons un algorithme auto-stabilisant probabi- liste qui utilise k ´ etats par pro cessus, o ` u k est un param` etre de l’algorithme. Quand k = ∆ + 1, l’algorithme retrouve un comportement correct en O (∆ n ) actions en mo y enne. Mais si k augmente de mani` ere arbitraire, l’algorithme retrouv e un com- p ortemen t correct en O ( n ) actions en moy enne. Au final, notre algorithme p eut ˆ etre rendu optimal en espace ou en temps. Mots-cl ´ es : auto-stabilisation, b ornes inf´ erieures, r´ eseaux unidirectionels, colo- riage Bounds for self-stabilization in unidir e ctional networks 3 1 In tro duction One of the most v ersatile technique to ensure forw ard reco v ery of distributed systems is that of self-stabilization [9, 10]. A distributed algorithm is self-stabilizing if after faults and attacks hit the system and place it in some arbitrary global state, the systems reco vers from this catastrophic situation without external ( e.g. h uman) in terv ention in finite time. Self-stabilization makes no hypotheses ab out the extent or the nature of the faults and attacks that may harm the system, yet ma y induce some o verhead ( e.g. memory , time) when there are no faults, compared to a classical ( i.e. non-stabilizing) solution. Computing space and time b ounds for particular problems in a self-stabilizing setting is thus crucial to ev aluate the impact of adding forw ard reco v ery properties to the system. The v ast ma jority of self-stabilizing solutions in the literature [10] considers bidi- rectional comm unications capabilities, i.e. if a pro cess u is able to send information to another pro cess v , then v is alwa ys able to send information back to u . This assumption is v alid in many cases, but can not capture the fact that asymmetric situations ma y o ccur, e.g. in wireless netw orks, it is p ossible that u is able to send information to v y et v can not send an y information back to u ( u may hav e a wider range an tenna than v ). Asymmetric situations, that we denote in the follo wing under the term of unidir e ctional net w orks, preclude many common techniques in self-stabilization from b eing used, suc h as preserving local predicates (a pro cess u ma y tak e an action that violates a predicate in v olving its outgoing neighbors without u kno wing it, since u can not get an y input from them). Related w orks Self-stabilization in bidirectional net works mak es a distinction b et ween glob al tasks ( i.e. tasks whose sp ecification forbids particular state com bi- nations of pro cesses arbitrarily far from one another in the netw ork, such as leader election) and lo c al tasks (whose sp ecifications forbid particular state com binations only for pro cesses that are at distance at most d from one another, for some pa- rameter d ). Local tasks are often considered easier in bidirectional netw orks since detecting incorrect situations requires less memory and computing p o w er [3], recov- ering can b e done lo cally [2], and Byzantine con tainmen t can b e guaranteed [19, 21]. Since a self-stabilizing algorithm may start from an y arbitrary state, low er b ounds for non-stabilizing ( a.k.a. prop erly initialized) distributed algorithms still hold for self-stabilizing ones. As a result, relatively few w orks in vestigate low er b ounds that are sp ecific to self-stabilization [4, 11, 12, 14, 17, 22]. Results related to space low er b ounds deal with global tasks ( e.g. constructing a spanning tree [11], finding a cen- RR n ° 6524 4 S. Bernar d et al. ter [11], electing a leader [4, 11], passing a tok en [12, 14, 22], etc.). [17] pro vides a time lo w er b ound for self-stabilizing token passing, still a global task. Global tasks t ypically require Ω( n ) states p er pro cess ( i.e. Ω(log( n ) bits per pro cess) and Ω( n ) time complexit y to reco ver from faults. In v estigating the p ossibilit y of self-stabilization in unidirectional netw orks was recen tly emphasized in sev eral papers [1, 5, 6, 8, 13, 15, 16] 1 . In particular, [6] sho w that in the simple case of acyclic unidirectional netw orks, nearly any recursive function can b e computed anonymously in a self-stabilizing wa y . Computing global tasks in a general top ology requires either unique iden tifiers [1, 5, 13] or distinguished pro cesses [8, 15, 16]. Observ e that all aforemen tioned w orks consider global tasks, and provide constructiv e upper bound results ( i.e algorithms), lea ving the question of matc hing low er b ounds op en. Our contribution In this pap er, we inv estigate the in trinsic complexit y of ac hiev- ing self-stabilization in unidirectional netw orks, and fo cus on the classical v ertex coloring problem, a lo cal task with sev eral known efficient self-stabilizing solutions in bidirectional net w orks [18, 20]. Deterministic and probabilistic solutions require only a num b er of states that is prop ortional to the netw ork maximum degree ∆, and the n umber of actions p er pro cess in order to recov er is O (∆) (in the case of a deterministic algorithm) or exp ected O (1) (in the case of a probabilistic one). T o satisfy the vertex coloring sp ecification in unidirectional net w orks, an algorithm m ust ensure that no tw o neighboring no des ( i.e. tw o no des u and v suc h that either u can send information to v , or v can send information to u , but not necessarily b oth) ha v e iden tical colors. The main result of this pap er is to show that solving a lo c al task in unidirec- tional net works with a deterministic algorithm is as difficult as solving a glob al task in bidirectional netw orks, while nice complexit y guaran tees can b e preserv ed with probabilistic solutions: 1. When deterministic solutions are considered, w e prov e a lo wer b ound of n states per process (where n is the net work size) and a recov ery time of at least n ( n − 1) / 2 actions in total. W e presen t a deterministic algorithm with matc hing upper b ounds that p erforms in arbitrary graphs. 2. When probabilistic solutions are considered, we observe that at least ∆ + 1 states p er pro cess and a reco v ery time of Ω( n ) actions in total are required. 1 W e do consider here the ov erwhelming n um b er of con tributions that assume a unidirectional ring shap ed net work, please refer to [10] for additional references INRIA Bounds for self-stabilization in unidir e ctional networks 5 W e present a probabilistically self-stabilizing algorithm that uses k states per pro cess, where k is a parameter of the algorithm. When k = ∆ + 1, the algorithm reco v ers in exp ected O (∆ n ) actions. When k may grow arbitrarily , the algorithm recov ers in exp ected O ( n ) actions in total. Th us, our algorithm can be made optimal with resp ect to space or time complexit y . Outline The remaining of the pap er is organized as follows: Section 2 presen ts the programming model and problem sp ecification, Section 3 provides imp ossibilit y results and low er b ounds for our problem, while Sections 4 and 5 present match- ing upp er b ounds (in the deterministic case) and asymptotically matc hing upp er b ounds (in the probabilistic case). Section 6 gives some concluding remarks and op en questions. 2 Mo del Program mo del A program consists of a set V of n pro cesses. A pro cess main- tains a set of v ariables that it can read or update, that define its state . Each v ariable ranges o ver a fixed domain of v alues. W e use small case letters to denote singleton v ariables, and capital ones to denote sets. A pro cess contains a set of c onstants that it can read but not up date. A binary relation E is defined ov er distinct pro cesses suc h that ( i, j ) ∈ E if and only if j can read the v ariables main tained by i ; i is a pr e de c essor of j , and j is a suc c essor of i . The set of predecessors (resp. successors) of i is denoted by P.i (resp. S.i ), and the union of predecessors and successors of i is denoted by N .i , the neighb ors of i . In some case, we are interested in the iterated notions of those sets, e.g. S.i 0 = i , S.i 1 = S.i , . . . , S.i k = ∪ j ∈ S.i S.j k − 1 . The v al- ues δ in .i , δ out .i , and δ .i denote resp ectiv ely | P .i | , | S.i | , and | N .i | ; ∆ in , ∆ out , and ∆ denote the maximum p ossible v alues of δ in .i , δ out .i , and δ.i o v er all pro cesses in V . An action has the form h name i : h g uar d i − → h command i . A guar d is a Bo olean predicate o v er the v ariables of the pro cess and its comm unication neighbors. A c om- mand is a sequence of statements assigning new v alues to the v ariables of the process. W e refer to a v ariable v and an action a of pro cess i as v .i and a.i resp ectively . A p ar ameter is used to define a set of actions as one parameterized action. A c onfigur ation of the program is the assignment of a v alue to every v ariable of each pro cess from its corresp onding domain. Eac h process con tains a set of actions. An action is enable d in some configuration if its guard is true in this configuration. A c omputation is a maximal sequence of configurations suc h that for eac h configuration γ i , the next configuration γ i +1 is obtained by executing the RR n ° 6524 6 S. Bernar d et al. command of at least one action that is enabled in γ i . Maximality of a computation means that the computation is infinite or it terminates in a configuration where none of the actions are enabled. A program that only has terminating computations is silent . A sche duler is a predicate on computations, that is, a sc heduler is a set of p ossible computations, suc h that every computation in this set satisfies the sc heduler predicate. W e distinguish t w o particular schedulers in the sequel of the pap er: the distribute d scheduler corresp onds to predicate true (that is, all computations are allo w ed); in con trast, the lo c al ly c entr al scheduler implies that in an y configuration b elonging to a computation satisfying the sc heduler, no t w o enabled actions are executed sim ultaneously on neigh b oring pro cesses. A configuration c onforms to a predicate if this predicate is true in this config- uration; otherwise the configuration violates the predicate. By this definition every configuration conforms to predicate true and none conforms to false . Let R and S b e predicates ov er the configurations of the program. Predicate R is close d with resp ect to the program actions if every configuration of the computation that starts in a configuration conforming to R also conforms to R . Predicate R c onver ges to S if R and S are closed and an y computation starting from a configuration conform- ing to R contains a configuration conforming to S . The program deterministic al ly stabilizes to R if and only if true conv erges to R . The program pr ob abilistic al ly stabilizes to R if and only if true conv erges to R with probability 1. Problem sp ecification Consider a set of colors ranging from 0 to k − 1, for some in teger k ≥ 1. Each pro cess i defines a function c olor .i that tak es as input the states of i and its predecessors, and outputs a v alue in { 0 , . . . , k − 1 } . The unidir e ctional vertex c oloring predicate is satisfied if and only if for every ( i, j ) ∈ E , c olor .i 6 = c olor .j . 3 Imp ossibilit y results and lo w er b ounds General bounds W e first observ e tw o lo wer b ounds that hold for any kind of silen t program that is self-stabilizing or probabilistically self-stabilizing for the uni- directional coloring sp ecification: 1. The minimal numb er of states p er pr o c ess is ∆ + 1. Consider a bidirectional clique net work (that is (∆ + 1)-sized), and a terminal configuration of the program. Suppose that only ∆ states are used, then at least tw o pro cesses INRIA Bounds for self-stabilization in unidir e ctional networks 7 i and j hav e the same state, and ha ve the same view of their predecessors. As a result c olor .i = c olor .j , and i and j b eing neighbors, the unidirectional coloring predicate do es not hold in this terminal configuration. 2. The minimal numb er of moves over al l is Ω( n ). Consider a unidirectional c hain of processes whic h are all initially in the same state. F or ev ery process but one, the color is identical to that of its predecessor. Since a c hange of state ma y only resolv e t w o conflicts (that of the mo ving no de and that of its successor), a n um b er of ov erall mov es at least equal to b n/ 2 c is required, th us Ω( n ) mov es. Deterministic b ounds The rest of the section is dedicated to deterministic im- p ossibilit y results and low er b ounds. Theorem 1 (presented b elow) shows that if unconstrained sc hedules ( i.e. the sc heduler is distributed) are allow ed, some initial symmetric configurations can not b e broken afterwards, making the unidirectional coloring problem imp ossible to solve by a deterministic algorithm. This justifies the later assumption of a lo cally cen tral scheduler in Section 4, i.e. a scheduler that nev er sc hedules for execution t w o neigh b oring activ atable pro cesses simultane ously . Lemma 1 L et an unidir e ctional network { p 0 , p 1 , . . . , p n − 1 } of size n . Consider ev- ery no de exe cutes a uniform deterministic self-stabilizing uniform c oloring algorithm. Whenever ther e exists i such that s.p i = s.p ( i − 1) mod n , p i is activatable and if acti- vate d would change its state to s 0 .p i with s 0 .p i 6 = s.p i . Pro of: W e first show that p i is activ atable. Assume the contrary , and consider a uniform cycle of n no des that are all in the same state. If p i is not activ atable, none of the remaining pro cesses is activ atable either. Hence, the configuration is terminal. Now, a pro cess p i ma y only read its o wn state and that of its predecessor in the cycle, so the color c olor .p i is uniquely determined b y these t w o v alues only . Moreo v er, the c olor .p i is the same as c olor .p ( i − 1) mod n . So, the configuration is terminal and tw o neighboring pro cesses hav e the same color. This con tradicts the fact that the algorithm is a deterministic self-stabilizing unidirectional coloring one. Then we show that p i , if activ ated mov es to a different state s 0 .p i . Assume p i mo v es to the same state s.p i , then if the starting configuration is such that all no des ha v e the same state, then no no de is able to c hange its state, the algorithm b eing uniform. Since this configuration can not b e a coloring, the system never changes the global configuration and th us is not self-stabilizing. 2 Theorem 1 Ther e exists no uniform deterministic self-stabilizing c oloring algo- rithm that c an run on any unidir e ctional gr aph under a distribute d sche duler. RR n ° 6524 8 S. Bernar d et al. Pro of: Assume the con trary . Consider a unidirectional cycle { p 0 , p 1 , . . . , p n − 1 } of size n . Assume that in the initial state all no des are in the same state s (see Figure 1.(a)). By Lemma 1, all no des are activ atable, and if a no de is activ ated b y the sc heduler, it mo ves to a differen t state s 0 . Consider the sync hronous sc heduler that, at eac h step, activ ates all no des. Then, after one scheduler activ ation, all nodes ha v e state s 0 (see Figure 1.(b)). After another activ ation, all no des mov e to state s 00 , etc. In this infinite execution, every configuration has all nodes with the same state and th us, the coloration problem is not solved. As a result, the algorithm can not be self-stabilizing. 2 Notice that the result of Theorem 1 holds ev en if the program is not required to b e silen t or if participating pro cesses ha v e infinite n umber of states. F rom no w on, we assume the scheduler is lo cally central. W e demonstrate that a uniform silent deterministic self-stabilizing algorithm for the unidirectional coloring problem m ust use at least n states p er pro cess in general netw orks. The pro of is b y exhibiting a particular family of netw orks (namely , n -sized cycles) in which the b ound is reac hed by any such algorithm ev en assuming a lo cally central scheduler. Algorithm 1 A uniform deterministic coloring algorithm for unidirectional rings pro cess i const k : integer p.i : predecessor of i v ar c.i : color of node i action c.i = c.p.i → c.i := c.i + 1mo d k Lemma 2 Consider a unidir e ctional cycle { p 0 , p 1 , . . . , p n − 1 } of size n . Consider a sche duler that only activates a no de p i when s.p i = s.p ( i − 1) mod n . Assume every no de exe cutes a uniform deterministic self-stabilizing unidir e ctional c oloring algo- rithm that uses a finite numb er of states K . Ther e exists an initial c onfigur ation such that the state se quenc e starting fr om this c onfigur ation is isomorphic to that of A lgorithm 1, for some p ar ameter k ≤ K . INRIA Bounds for self-stabilization in unidir e ctional networks 9 Pro of: Consider a unidirectional cycle { p 0 , p 1 , . . . , p n − 1 } of size n . Assume a no de p i is activ ated only when its state s.p i is equal to s.p ( i − 1) mod n , the state of the predecessor of p i in the cycle. Then, the transition function of node p i is solely based on the state s.p i . Let s (0) , s (1) , . . . the sequence of states returned by the transition function of pro cess p i executing the self-stabilizing coloring algorithm started in an arbitrary state s (0). Note that (i) the nu mber of states is finite, (ii) a pro cess with the same state as its predecessor is alwa ys activ atable (Lemma 1), and (iii) the proto col is deterministic. Then, the shap e of the transition function of p i is as depicted in Figure 2.(a). That is, there exist i and l ( i < l ) such that s ( i ) = s ( l ) and l − i ≤ K . Since the proto col is self-stabilizing, it may b e started from an y arbitrary state, and in particular from state s ( i ) (in Figure 2.(a)). Let denote s ( j ) b y j − i , ∀ i ≤ j < l . The transition function of p i is isomorphic to that of the same pro cess executing Algorithm 1 (given in Figure 2(b)) and assuming k = l − i . 2 Theorem 2 A silent uniform deterministic self-stabilizing pr oto c ol for unidir e c- tional c oloring r e quir es at le ast n states p er pr o c ess in a n -size d network (with n ≥ 2 ). Pro of: Assume there exists a silen t uniform deterministic self-stabilizing proto col for coloring that requires less than n states for a particular no de. Since the proto col is uniform, every no de m ust use k < n states. Consider a unidirectional cycle { p 0 , p 1 , . . . , p n − 1 } of size n . In what follows, we consider executions of the protocol in whic h the scheduler only activ ates no des that ha v e the same state as their predecessor. By Lemma 2, the transition function of ev ery no de is isomorphic to that of Algorithm 1, so w e assume all no des execute Algorithm 1 with k < n . In the following, w e consider k = n − 1 but the pro of is easily exp endable to any k < n b y putting the n − k + 1 last pro cessors in the same state. Now consider the unidirectional ring presented in Figure 3.(a). The scheduler only activ ates the single no de with the same state 0 as its paren t, and reac h the configuration presented in Figure 3.(b). The scheduler may no w activ ate the single no de with the same state 1 as its parent and reac h the configuration presen ted in Figure 3.(c). W e rep eat the argumen t and reac h the configuration presented in Figure 3.(d). This configuration is symmetric to that of the configuration presented in Figure 3.(a), so the pro cess can repeat infinitely often. As a result, the proto col is not silen t. 2 W e now address the question of time low er b ounds for deterministic self-stabilizing programs for the unidirectional coloring problem. Theorem 3 A silent uniform deterministic self-stabilizing pr oto c ol for unidir e c- tional c oloring c onver ges in at le ast n ( n − 1) 2 steps in gener al gr aphs. RR n ° 6524 10 S. Bernar d et al. Pro of: Consider a chain top ology , and assume that pro cessors are ordered from the sink p 1 to the source p n . Assume all processors are initially in the same state (a self-stabilizing program ma y start from any arbitrary configuration). W e now consider a loc ally central sc heduler that activ ates no des according to the schedule presen ted in Sc hedule 1. Sc hedule 1 Our n ( n − 1) 2 -steps sc heduling in n -sized c hains v ar i , j : in teger sc heduler for j from n − 1 to 1 for i from 1 to j activ ate p i Sc hedule 1 selects a single pro cess at a time for execution, th us it satisfies the lo cally cen tral sc heduler prop erty . In addition, it only selects for execution a process that has the same state as its predecessor (and th us activ atable b y Lemma 1): if p 1 to p k ha v e the same state s then p 1 to p k − 1 are activ atable and if they are activ ated in ascending order, p 1 to p k − 1 will mov e to the same “next” state s 0 (see Figure 2.(a)). So every process activ ation leads to an effectiv e mov e and the total n um b er of activ ations is P n − 1 i =1 i = n ( n − 1) 2 . Finally , all executions of the proto col m ust be terminating (it is silen t), and from an initial configuration where all pro cesses ha ve the same state, a lo cally central sc hedule (like Schedule 1) may leads to n ( n − 1) / 2 steps at least b efore termination. Hence the result. 2 4 Self-stabilizing deterministic unidirectional coloring In this section we prop ose a time and space optimal silen t self-stabilizing determin- istic algorithm for unidirectional coloring. The algorithm is referred thereafter as Algorithm 2 and p erforms under the lo cally central sc heduler. The algorithm can b e informally describ ed as follo ws: eac h pro cess i has an integer v ariable c.i (that ranges from 0 to k − 1, where k is a parameter of the algorithm) that denotes its color; whenever a no de has the same color as one of its predecessors, it c hanges its color to the next av ailable color (using the classical total order on integers). Here, the c olor .i function simply returns the color v ariable c.i of i . INRIA Bounds for self-stabilization in unidir e ctional networks 11 Algorithm 2 A uniform deterministic coloring algorithm for general unidirectional net w orks pro cess i const k : integer P .i : set of predecessors of i parameter p : no de in P.i v ar c.i : color of node i action p ∈ P .i , c.i = c.p → do p ∈ P .i , c.i = c.p → c.i := c.i + 1mo d k o d A configuration is le gitimate if, for ev ery pro cess i , and for every predecessor p ∈ P .i , c.i 6 = c.p.i . Ob viously , a legitimate configuration satisfies the unidirec- tional coloring predicate (assuming c olor .i return c.i ) and is terminal (all guarded commands are disabled). There remains to sho w how fast the algorithm attains a legitimate configuration in the w orst case for every p ossible lo cally central schedule. Theorem 4 A lgorithm 2 is a (state-optimal) uniform silent deterministic self-stabilizing pr oto c ol for c oloring no des in unidir e ctional gener al networks of size n (when k = n ), assuming a lo c al ly c entr al sche duler and c onver ges in n ( n − 1) 2 steps to a le gitimate c onfigur ation. Pro of: Assume Algorithm 2 starts in an arbitrary initial configuration c . W e no w consider the table that lists, for ev ery possible color (in the set { 0 , . . . , n − 1 } since w e assume k = n ), the pro cesses that curren tly ha v e this color. An example of such a table is presen ted as T able 1, where pro cesses P 3 and P 2 ha v e color 0, process P n − 2 has color n − 1, etc. This table is denoted in the sequel as the c olor table . According to Algorithm 2 the ev olution of the color table follo ws tw o rules: 1. A cell con taining one pro cess can not b ecome empt y . That is, a pro cess having a color not used by an y other pro cess in the system can not b e activ ated. In RR n ° 6524 12 S. Bernar d et al. Pro cessors P 3 , P 2 P n − 1 , P 1 ... P n − 2 States 0 1 2 3 ... n − 1 T able 1: An example of color table our algorithm, this is due to the fact that pro cesses are activ atable only if they share their color with their predecessor. 2. A pro cess only mov es to the righ t (in a cyclic manner) and can not jump ov er an empty cell. Indeed, when activ ated, a pro cess chooses the first “next” (in the sense of the usual total order on in tegers) unconflictual color hence the pro cesses alwa ys mov e to the righ t. A process ma y mov e by sev eral positions, but nev er skips a free position (this w ould mean that a pro cess does not c ho ose the ”next” color although this color is not conflicting with any other pro cess and th us not with the process predecessors). Since there are n cells and n processes, ev ery pro cess could b e placed in a differen t cell if necessary . Since a pro cess can not jump ov er an empty cell, after n − 1 mov es, a pro cess is sure to find a free cell. In fact, the n umber of mov es a pro cess may ha v e to p erform to reach a free cell dep ends on the n um b er of free cells. With k free cells, there are at most n − k consecutiv e non-empty cells that could p otentially pro v oke further conflicts. A pro cess, in order to reach a free cell has to p erform at most n − k mov es. Once this pro cess o ccupies a free cell, the n um b er of free cells decreases to k − 1. Starting with n − 1 free cell (every pro cess has the same color), and finishing with 1, at most 1 + 2 + ... + ( n − 1) = n ( n − 1) 2 steps are needed to hav e ev ery pro cess in a free cell or with a non-conflicting color ( i.e. different from that of its predecessors) and th us reac h a legitimate configuration. 2 5 Probabilistic self-stabilizing unidirectional coloring In Section 3, we observed that there exist low ers b ounds ev en for probabilistic ap- proac hes to the unidirectional coloring problem. The space lo wer b ound is ∆ + 1 and the time lo w er b ound is n (where ∆ and n are the degree and the size of the underlying simple undirected graph, resp ectively). The algorithm presented as Algorithm 3 can be informally describ ed as follows. If a pro cess has the same color as one of its predecessors then it chooses a new color in the set of a v ailable colors ( i.e. the set of colors that are not already used b y any INRIA Bounds for self-stabilization in unidir e ctional networks 13 of its predecessors). The colors are c hosen in a set of size k , where k is a parameter of the algorithm. In the follo wing, w e show that Algorithm 3 is probabilistically self-stabilizing for the unidirectional coloring problem if k > ∆. T o reach that goal w e pro ceed in t w o steps: first we show that any terminal configuration satisfies the unidirectional coloring predicate (Lemma 3); secondly , we sho w that the exp ected n um b er of steps to reac h a terminal configuration starting from an arbitrary one is b ounded (Lemma 7). Algorithm 3 A uniform probabilistic coloring algorithm for general unidirectional net w orks pro cess i const k : integer P .i : set of predecessors of i C.i : set of colors of nodes in P .i parameter p : no de in P.i v ar c.i : color of node i action p ∈ P .i , c.i = c.p → c.i := random ( { 0 , . . . , k − 1 } \ C .i ) Lemma 3 A ny terminal c onfigur ation satisfies the unidir e ctional c oloring pr e dic ate. Pro of: In a terminal configuration, every pro cess i satisfies ∀ j ∈ P.i, c.i 6 = c.j and ∀ j ∈ S.i, c.i 6 = c.j . Hence, in a terminal configuration, every process i has a color that is different from those of its neighbors, which prov es the theorem. 2 Definition 1 (Conflict) L et p b e a pr o c ess and γ a c onfigur ation. The tuple ( p , γ ) is c al le d a conflict if and only if ther e exists q ∈ P .p (the pr e de c essors of p ) such that c.q = c.p in γ . RR n ° 6524 14 S. Bernar d et al. Lemma 4 Assume k > ∆ . L et ( p , γ ) b e a c onflict. The exp e cte d numb er of c onflicts cr e ate d by the exe cution of one step of p in or der to r esolve ( p , γ ) is: δ.p − δ in .p k − δ in .p (1) Pro of: When a pro cess p executes Action A from γ , it c ho oses a new color in a set of at least k − δ in .p colors. That is, there are k colors and it can not choose a color c hosen by one of its predecessors, therefore at most δ in .p colors are remov ed from the set of p ossible choices. F or each q ∈ S.p ∧ q / ∈ P.p , p and q are in conflict if and only if, p chooses the color of q . Notice that p has 1 ( k − δ in .p ) c hance to create a new conflict. Since the n um b er of successors of p not in the set of predecessors of p , ] { q ∈ S.p ∧ q / ∈ P .p } , is δ .p − δ in .p , the exp ected n umber of created conflicts is δ.p − δ in .p k − δ in .p . 2 Lemma 5 L et ( p, γ ) b e a c onflict. The exp e cte d numb er of c onflicts cr e ate d by the exe cution of one step of p in or der to r esolve ( p , γ ) is less than or e qual to: M = ∆ − 1 k − 1 , k > ∆ (2) Pro of: Observ e that ∀ p ∈ V , ∆ ≥ δ.p , therefore ∀ p ∈ V , δ.p − δ in .p k − δ in .p ≤ ∆ − δ in .p k − δ in .p . In order to find an upp er b ound for this v alue, let f : p ∈ V , ∆ < k , δ in .p ∈ [0 , ∆] , δ in .p 7→ ∆ − δ in .p k − δ in .p . Its deriv ative exists and is f 0 ( δ in .p ) = ∆ − k ( k − δ in .p ) 2 . By h yp othesis, k > ∆, so f 0 ( δ in .p ) < 0 and f is decreasing. Therefore, f ( δ in .p ) is maximum when δ in .p = 0 but for this v alue ( p , γ ) can not be a conflict. Therefore, δ in .p ≥ 1 and f is maximum for δ in .p = 1 whic h leads to δ.p − δ in .p k − δ in .p ≤ ∆ − δ in .p k − δ in .p ≤ ∆ − 1 k − 1 . 2 Lemma 6 L et ( p, γ ) b e a c onflict. The exp e cte d numb er of step cr e ate d in or der to r esolve this c onflict is less than: k − 1 k − ∆ , k > ∆ (3) Pro of: F rom Lemma 5, the exp ected num b er of conflicts created b y one step of p is less than M = ∆ − 1 k − 1 . Then, the pro cesses in S.p who received the created conflicts pro duce at most M new conflicts eac h since there are at most M exp ected such pro- cesses. They will p erform M steps and create at most M 2 =  ∆ − 1 k − 1  2 new conflicts. Then the M 2 pro cesses in S .p 2 (the successors at distance t w o from p ), after M 2 step INRIA Bounds for self-stabilization in unidir e ctional networks 15 (one for eac h) will pro duce M 3 new conflicts. By recurrence, at most M i exp ected steps will b e executed and M i +1 new conflicts will b e created by the pro cesses in S.p i (the successors at distance i from p ). Finally , the exp e cted n um b er of steps executed is P ∞ i =0 M i = P ∞ i =0  ∆ − 1 k − 1  i . Note that ∆ ≥ 1 and k > ∆, so 0 < ∆ − 1 k − 1 < 1. The exp ected n um b er of steps executed in order to solve the conflict ( p, γ ) is P ∞ i =0  ∆ − 1 k − 1  i = 1 1 − ∆ − 1 k − 1 = k − 1 k − ∆ 2 Lemma 7 Starting fr om an arbitr ary c onfigur ation, the exp e cte d numb er of steps to r e ach a c onfigur ation verifying the unidir e ctional c oloring pr e dic ate is less or e qual to: n ( k − 1) k − ∆ , k > ∆ (4) Pro of: In the w orst case the n um b er of initial conflicts is n . Then the pro of is a direct consequence of Lemma 6. 2 Notice that with a minimal num b er of colors ( i.e. , k = ∆ + 1), the exp ected n um b er of steps to reach a terminal configuration starting from an arbitrary con- figuration is less than n ∆. Moreov er, when the num b er of colors increases ( i.e. , k → ∞ ), the exp ected n um b er of steps to reach a terminal configuration starting from an arbitrary configuration con v erges to n . Theorem 5 A lgorithm 3 is a pr ob abilistic self-stabilizing solution for the unidir e c- tional c oloring when k > ∆ . Pro of: The pro of is a direct consequence of Lemma 3 and Lemma 7. 2 6 Conclusion W e inv estigated the in trinsic complexity of performing lo cal tasks in unidirectional net w orks in a self-stabilizing setting. Con trary to “classical” bidirectional net works, lo cal vertex coloring now induces global complexity ( n states p er process at least, n mo v es p er pro cess at least) for deterministic solutions. W e presented state and time optimal solutions for the deterministic case, and asymptotically optimal solutions for the probabilistic case. This work raises sev eral imp ortan t open questions: 1. Our probabilistic solution can b e tuned to b e optimal in space (and is then with a ∆ multiplicativ e penalty in time), or optimal in time, but not both. Ho wev er, RR n ° 6524 16 S. Bernar d et al. our lo wer b ounds do not preclude the existence of probabilistic solutions that are optimal for b oth complexity measures. 2. Sev eral of the lo w er b ounds w e provide in the deterministic case rely on the silence prop ert y of the expected solution. W e question the p ossibility of de- signing deterministic algorithms that are not silent y et pro vide coloring with less than n colors in general graphs. References [1] Y ehuda Afek and Anat Bremler-Barr. Self-stabilizing unidirectional netw ork algorithms b y p ow er supply . Chic ago J. The or. Comput. Sci. , 1998, 1998. [2] Y ehuda Afek and Shlomi Dolev. Lo cal stabilizer. J. Par al lel Distrib. Comput. , 62(5):745–765, 2002. [3] Joffro y Beauquier, Sylvie Dela¨ et, Shlomi Dolev, and S ´ ebastien Tixeuil. T ran- sien t fault detectors. Distribute d Computing , 20(1):39–51, 2007. [4] Joffro y Beauquier, Maria Gradinariu, and Colette Johnen. Randomized self- stabilizing and space optimal leader election under arbitrary sc heduler on rings. Distribute d Computing , 20(1):75–93, 2007. [5] Jorge Arturo Cobb and Mohamed G. Gouda. Stabilization of routing in directed net w orks. In Datta and Herman [7], pages 51–66. [6] Sa jal K. Das, Ajoy Kumar Datta, and S´ ebastien Tixeuil. Self-stabilizing algo- rithms in dag structured net w orks. Par al lel Pr o c essing L etters , 9(4):563–574, Decem b er 1999. [7] Ajo y Kumar Datta and T ed Herman, editors. Self-Stabilizing Systems, 5th International Workshop, WSS 2001, Lisb on, Portugal, Octob er 1-2, 2001, Pr o- c e e dings , v olume 2194 of L e ctur e Notes in Computer Scienc e . Springer, 2001. [8] Sylvie Dela¨ et, Bertrand Ducourthial, and S ´ ebastien Tixeuil. Self-stabilization with r-op erators revisited. Journal of A er osp ac e Computing, Information, and Communic ation , 2006. [9] Edsger W. Dijkstra. Self-stabilizing systems in spite of distributed con trol. Commun. ACM , 17(11):643–644, 1974. INRIA Bounds for self-stabilization in unidir e ctional networks 17 [10] S. Dolev. Self-stabilization . MIT Press, March 2000. [11] Shlomi Dolev, Mohamed G. Gouda, and Marco Schneider. Memory require- men ts for silen t stabilization. A cta Inf. , 36(6):447–462, 1999. [12] Shlomi Dolev, Amos Israeli, and Shlomo Moran. Resource b ounds for self- stabilizing message-driv en proto cols. SIAM J. Comput. , 26(1):273–290, 1997. [13] Shlomi Dolev and Elad Schiller. Self-stabilizing group comm unication in di- rected net works. A cta Inf. , 40(9):609–636, 2004. [14] Philippe Duchon, Nicolas Hanusse, and S´ ebastien Tixeuil. Optimal random- ized self-stabilizing mutual exclusion in sync hronous rings. In Pr o c e e dings of the 18th Symp osium on Distribute d Computing (DISC 2004) , n um b er 3274 in Lecture Notes in Computer Science, pages 216–229, Amsterdam, The Neder- lands, October 2004. Springer V erlag. [15] Bertrand Ducourthial and S´ ebastien Tixeuil. Self-stabilization with r-op erators. Distribute d Computing , 14(3):147–162, July 2001. [16] Bertrand Ducourthial and S´ ebastien Tixeuil. Self-stabilization with path alge- bra. The or etic al Computer Scienc e , 293(1):219–236, 2003. Extended abstract in Sirrocco 2000. [17] Christophe Genolini and S´ ebastien Tixeuil. A low er b ound on k-stabilization in async hronous systems. In Pr o c e e dings of IEEE 21st Symp osium on R eliable Distribute d Systems (SRDS’2002) , Osak a, Japan, Octob er 2002. [18] Maria Gradinariu and S ´ ebastien Tixeuil. Self-stabilizing v ertex coloring of arbi- trary graphs. In International Confer enc e on Principles of Distribute d Systems (OPODIS’2000) , pages 55–70, Paris, F rance, December 2000. [19] T oshimitsu Masuzaw a and S´ ebastien Tixeuil. Stabilizing link-coloration of ar- bitrary netw orks with unbounded b yzantine faults. International Journal of Principles and Applic ations of Information Scienc e and T e chnolo gy (P AIST) , 1(1):1–13, Decem b er 2007. [20] Nathalie Mitton, Eric Fleury , Isabelle Gu´ erin-Lassous, Bruno S´ ericola, and S ´ ebastien Tixeuil. On fast randomized colorings in sensor net w orks. In Pr o- c e e dings of ICP ADS 2006 , pages 31–38. IEEE Press, July 2006. RR n ° 6524 18 S. Bernar d et al. [21] Mikhail Nesterenk o and Anish Arora. T olerance to unbounded b yzantine faults. In 21st Symp osium on R eliable Distribute d Systems (SRDS 2002) , pages 22–. IEEE Computer So ciet y , 2002. [22] S ´ ebastien Tixeuil. On a space-optimal distributed tra v ersal algorithm. In Datta and Herman [7], pages 216–228. INRIA Bounds for self-stabilization in unidir e ctional networks 19 s s s s s s s s (a) uniform configuration in state s s' s' s' s' s' s' s' s' (b) uniform configuration in state s 0 Figure 1: A p ossible execution with synchronous scheduling RR n ° 6524 20 S. Bernar d et al. s(i) s(i+1) s(l-2) s(l-1) s(0) s(2) s(1) (a) state transition function of a uniform de- terministic self-stabilizing algorithm 0 1 2 3 4 k-2 k-1 (b) state transition function of Algorithm 1 Figure 2: Isomorphism of the state transition function when s.p i = s.p i − 1 mod n INRIA Bounds for self-stabilization in unidir e ctional networks 21 0 1 2 3 4 n-2 0 activation (a) starting configuration 1 1 2 3 4 n-2 0 activation (b) after 1 step 1 2 2 3 4 n-2 0 activation (c) after 2 steps 1 2 3 4 n-2 0 0 activation (d) after n − 1 steps Figure 3: A p ossible execution of Algorithm 1 RR n ° 6524 Unité de recherche INRIA Futurs Parc Club Orsay Uni versité - ZA C des V ignes 4, rue Jacques Monod - 91893 ORSA Y Cedex (France) Unité de recherche INRIA Lorraine : LORIA, T echnopôle de Nancy-Brabois - Campus scientifique 615, rue du Jardin Botanique - BP 101 - 54602 V illers-lès-Nancy Cedex (France) Unité de recherche INRIA Rennes : IRISA, Campus universitaire de Beaulieu - 35042 Rennes Cede x (France) Unité de recherche INRIA Rhône-Alpes : 655, avenue de l’Europe - 38334 Montbonnot Saint-Ismier (France) Unité de recherche INRIA Rocquencourt : Domaine de V oluceau - Rocquencourt - BP 105 - 78153 Le Chesnay Cedex (France) Unité de recherche INRIA Sophia Antipolis : 2004, route des Lucioles - BP 93 - 06902 Sophia Antipolis Cedex (France) Éditeur INRIA - Domaine de V oluceau - Rocquencourt, BP 105 - 78153 Le Chesnay Cedex (France) http://www.inria.fr ISSN 0249-6399

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment