Quiescence of Self-stabilizing Gossiping among Mobile Agents in Graphs

This paper considers gossiping among mobile agents in graphs: agents move on the graph and have to disseminate their initial information to every other agent. We focus on self-stabilizing solutions for the gossip problem, where agents may start from …

Authors: Toshimitsu Masuzawa, Sebastien Tixeuil (LIP6, INRIA Futurs)

Quiescence of Self-stabilizing Gossiping among Mobile Agents in Graphs
apport   de recherche ISSN 0249-6399 ISRN INRIA/RR--6458--FR+ENG Thème NUM INSTITUT N A TION AL DE RECHERCHE EN INFORMA TIQUE ET EN A UTOMA TIQUE Quiescence of Self-stabilizing Gossiping among Mobile Agents in Graphs T oshim itsu Masuza wa — Sébastien T ixeuil N° 6458 March 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éco pie : +33 1 60 19 66 08 Quiescence of Self-stabili zing G ossiping among Mobile Agen ts in Graphs T oshimitsu Masuza w a ∗ , S ´ ebastien Tixeuil † Th` eme NUM — Syst` emes num ´ eriques Pro jet Grand large Rapp ort de recherche n ° 6458 — March 2008 — 17 pages Abstract: This paper consider s gossiping among mobile age n ts in g r aphs: a gents mo ve on the graph and have to disseminate their initial informa tio n to every other agent. W e fo cus on self-stabilizing solutio ns for the g ossip problem, where a gents may star t from a rbitrary lo cations in arbitr ary states. Self-sta bilization requir es (some of the) par ticipating agents to keep moving forever, hinting at maximizing the num b er of ag en ts that could be allow ed to stop moving even tually . This pa p er formalizes the self-stabilizing agent gossip pr oblem , introduces the quiesc enc e numb er ( i.e. , the maxim um num b er of even tua lly stopping a g ent s) of self-stabilizing so lu- tions a nd in vestigates the quiescence num ber with resp ect to several assumptions related to agent ano n ymity , sy nc hrony , link duplex capac it y , and whiteb oa rd capa c ity . Key-w ords: Distributed systems, Distributed alg o rithm, Self-stabilization, Mobile Agen ts ∗ Osak a Uni v ersity , Japan † Univ. Pierre & Marie Curie - Paris 6, LIP6-CNRS & INRIA, F rance Qui ´ etude des comm´ e rages auto-stabilisan ts parmi des agen ts mobile s dans les graphes R´ esum´ e : Dans cet ar ticle , nous consid´ er ons le pr o bl` eme du co mm ´ erage parmi des ag ent s mobiles ´ evoluan t dans un graphe : les ag ent s se d´ eplac e n t dans le graphe et doiven t diss´ eminer leur information initiale ` a tous les autres agents. Nous nous restr eignons aux solutions auto-stabilisa n tes p our ce probl ` eme, o ` u les a gents p euven t d´ emarr er depuis des po sitions arbitrair es dans des ´ etats ar bitraires. La propri´ et´ e d’auto - stabilisation impo se q ue certains des participants c o nt inuen t de se d´ eplacer ind´ efiniment, et m` ene a u probl` eme de maximiser le nombre d’agents autoris´ es ` a s’ar rˆ eter au bo ut d’un temps fini. Cet article forma lise le pr obl` eme du co mm ´ erage auto-sta bilisant et in tro duit l’indice de qui´ etude ( i.e. , le nombre maximum d’agent autor is´ es ` a s’a r rˆ eter au b out d’un temps fini) des solutions auto-stabilis a nt es. Nous ´ etudions l’´ evolution de l’indice de qui´ etude suiv ant les hyp o th ` eses li´ ees ` a l’a no n ymat des agents, la synchronie, la bidir ectionalit´ e des liens, et la pr´ es ence de tableaux blancs . Mots-cl´ es : Sys t ` emes distribu´ es , Algor ithme distribu´ e, Auto-stabilisation, Agents mobiles Quiesc en c e of Self-stabilizing Gossiping 3 1 Int ro duction Distributed systems in volving mobile entit ies calle d agents or r ob ots rec en tly attracted a widespread attent ion as they enable ada ptive and flexible solutions to several problems. Int uitively , ag ent s 1 are mobile entities o per ating in a netw o rk that is mo deled by a gra ph; agents have limited computing capabilities and are a ble to mov e fro m a no de to one of its neighbors. The gossip pr oblem among mobile agents was intro duced b y Suzuki et al. [9, 10] as one o f the most fundamental schemes supp orting co op era tion amo ng mobile age nts. The problem requires ea ch agent to disseminate the information it is initially given to all other agents. Suzuki et al. [9, 10] in vestigated the problem of minimizing the num b er of agent mov es for the gossip pr oblem in fault- fr e e netw orks, a nd pres ent ed asymptotically optimal distributed solutions o n several netw ork top ologies . With the adven t of larg e-scale netw orks that in volv e a total n umber of comp onents in the order of the million, the fault (a nd attack) tolerance capa bilities b ecome a t least as imp o rtant as r esource minimization. In this pap er, we consider the goss ip problem in netw orks where bo th age nts and no des ca n b e hit by unpr edictable faults or attacks. More pre c is ely , we consider that arbitra ry transient faults hit the system (b oth agents a nd no des), and devise algorithmic solutions to recover from this catas tr ophic situation. The faults and attacks are tr ansient in the sense that there exists a p oint fro m which they don’t app ear any more. In practice, it is sufficient that the faults and attacks are sp o radic eno ugh for the netw ork to provide useful services most of the time. Our solutions are ba sed o n the paradigm of self- stabilization [4 ], an eleg ant approach to for w ar d recovery fro m transient faults a nd attacks as well as initializing la rge-sca le sys tems. Informally , a s elf-stabilizing s ystem is able to recov er fr o m any transient fault in finite time, without restr icting the nature or the span of those faults. Related w orks. Mobile (softw are) agents on graphs were studied in the c o nt ext of self- stabilization e.g. in [1, 6 , 7, 8 ], but the implicit mo del is completely different from o urs. In the aforementioned works, agents are so ft ware entities that a re exchanged throug h messa ges betw een pro cess e s (that a re loca ted in the no des of the net work), and thus ca n b e destroy ed, duplicated, a nd created at will. The studied problems include stabilizing a netw ork by means of a single non-stabilizing ag en t in [1, 7], regula ting the num b er o f sup erfluous agents in [6], and ensuring reg ular trav ersa ls of k agents in [8]. In this pa per , we follow the mo del previously used in [2], that studies necessar y and sufficient co nditio n for the problems o f naming and electing a gents in a netw ork. The mo del assumes that the num b er of agents is fixed during any execution of the alg o rithm, but can start fro m any arbitra r y lo catio n in the netw ork a nd in any a rbitrary initial state. Agents can communicate with other agents only if they are cur rently lo cated on the same no de, or make use of so -called whiteb o ar ds - public memory v ariables lo cated at each no de. Of course, whiteb oards may initially hold ar bitrary co nt ents due to a transient fault o r attack. 1 Agen ts and r ob ots can b e used int erchange ably in this paper. RR n ° 6458 4 T oshimitsu Masuzawa , S´ eb ast ien Tixeuil T a ble 1: Quies cence num be r s of the k -go s sip problem named agen ts anonymous agen ts synchrono us model asynchron ous mo del sync hronous model asynchr onous model whiteboards half-duplex full-duplex half-duplex full-duplex half-duplex full-duplex half-duplex full-duplex FW k − 1 (Th. 1 & 3) 0 (Th. 6) ≥ 0 (Th. 10) 0 (Th. 9) CW k − 1 (Th. 1 & 3) 0 (Th. 7) − 1 ( Th. 5) − 1 (Th. 8) − 1 (Th. 8) NW − 1 (Th. 4) − 1 (Th. 4) − 1 (Th. 5) − 1 ( Th. 4) − 1 ( Th. 4) − 1 (Th. 5) Our contr ibutio n. The contribution of this pa per is tw ofold: 1. W e introduce the quiesc enc e numb er of self-stabilizing agent-based so lutio ns to q uan- tify communication e fficiency after co nvergence. Self-stabilizing ag e n t-based solutions inherently r equire (some of the) pa rticipating agents to ke ep moving forever. This hin ts at maximizing the num b er o f ag en ts that could b e allow ed to stop moving after some p oint in every executio n. The quies cence num ber deno tes the maximum p os sible nu mber of stopping ag ent s 2 for a given particular pr oblem. 2. W e study the quiescence num b er of self-stabilizing k -g o ssiping (that denotes the gos- siping among k age nts). The quies c ence num ber s w e obtain are summarized in T able 1, where ” − 1 ” r epresents imp o ssibility o f 0-quiesc ence (that is, the pro ble m is imp os- sible to so lve in a s elf-stabilizing way , even if ag ent s are all allow ed to mov e for ever). W e co nsider the q uies cence num b er under v arious assumptions ab out synchron y (syn- chronous/asynchronous), no de whiteboa rds ( FW / CW / N W ), edge capacity (half- duplex/full-duplex) and a nonymit y o f the agents. The details o f the assumptions ar e presented in the next section. Outline. In Section 2, we pres en t the computing mo del with v ar ious assumptions we consider in this pap er. W e also in tro duce the g ossip pr oblem and define the quiescence nu mber of the goss ip problem. Section 3 provides imp ossibility/p o ssibility r esults in the mo del where each agent has a unique id . Section 4 briefly consider s the quiescence num ber s in the mo del o f ano nymous ag e n ts. Concluding remark s are presented in Section 5. 2 Pr eliminaries Mo del. The netw o rk is modele d as a connected gra ph G = ( V , E ), where V is a set of no des, and E is a set of edges. W e a ssume that no des are anonymous , that is, no no de has a unique id and all the no des with the same degr ee ar e identical. W e also a ssume that no des hav e lo cal distinct lab els for incident links, how ever no a ssumption is ma de ab out the lab els. Each no de also maintains a so- called whiteb o ar d that can store a fixed amount of information. 2 Minimizing commu nication af ter con vergenc e in ordinary self-stabilizing solutions has b een l argely in- v estigated with silent [5] proto cols, and has b een recen tly tackled, e.g. in [3] for message passing systems INRIA Quiesc en c e of Self-stabilizing Gossiping 5 A gents (or r ob ots ) are entities that mov e b e tw een neighbor ing no des in the netw ork. Each a gent is mo deled by a deterministic state machine. An a gent staying a t a no de may change its state, leav e some information on the whiteboa rd of the no de, and mov e to o ne of the no de’s neighbors based on the following information: (i) the current state of the a g ent , (ii) the current states of other a gents lo cated at the same no de, (iii) the lo ca l link lab els of the curr ent no de (and p os sibly the lab el of the inco ming link used by the agent to reach the no de), and (iv) the conten ts of the whiteb oard at the node. In other words, the only wa y for tw o agents to communicate is by b e ing hosted by the same no de or by using no de whitebo ards. In this pap er, w e consider several v a riants of the mo del, which fall into several ca tegories: 1. Agent anon ymit y : we consider t wo v ar iants, na med ag ent s and anonymous a gents. Each agent has a unique identifier in the name d agent model, and all agents are anonymous a nd identical in the anonymous ag en t mo del. 2. Sync hron y : we consider tw o v aria n ts, synchronous mo del and asynchronous mo del. In the synchr onous mo del, a ll the agents are sy nc hroniz e d by rounds in the lo ck-step fashion. Every agent executes its action at every r ound and can mov e to a neigh b oring no de. When tw o (or mo re) agents are at the same no de, all the agents e xecute their actions in one round but in sequence. In the asynchr onous mo del, there is no bound on the n umber of moves that an age nt can mak e betw een any tw o mov es o f another agent. How ev er, we assume that each agent is eventually allowed to execute its a ction. When t wo (or more ) ag en ts ar e at the sa me no de, they execute their actions sequentially . How ev er, a g ent s lo cated at different no des may execute their actions co ncurrently . 3. Link duple x capacit y : we consider t wo v a riants, full-duplex links and half-duplex links. A link is ful l-duplex if tw o agents lo cated a t neighbo r ing no des can e xchange their po sition at the sa me time, crossing the same link in opp osite directions without meeting each other. A link is half-duplex if only one directio n ca n b e used at a given time 3 . 4. Whiteb oa rd capacit y : we consider three distinct hypothesis fo r information stored in the no des’ whiteb oards. In the NW (No Whiteb oard) mo del, no information can be stored in the whitebo ard. In the CW (Control Whiteb oard) model, only control information can b e stor e d in the whiteb oard. In the FW (F ull Whiteboa r d) mo del, any infor ma tion can b e stored in the whiteboa rd (including go ssip informatio n, defined later in this section). Of cour s e, there is a strict inclusio n of the hypothes e s , and a solution that r equires only e.g. the N W or the CW class es will work with the les s re stricted class e s ( CW and FW , and FW , r esp e c tiv ely). Con versely if an imp ossibility result is shown for le s s res tr icted classes e.g. CW a nd FW , it remains v alid in the more restricted c lasses ( NW , and NW and CW , res pectively). 3 If tw o agen ts at the different ends of a half -duplex link try to migrate along the link si mu ltaneously , only one of them succeeds to migrate. RR n ° 6458 6 T oshimitsu Masuzawa , S´ eb ast ien Tixeuil The fir s t set of hypothes e s (or the a gent ano nymit y) divides b etw een Sectio ns 3 and 4. In each section, the remaining hypo theses (sy nc hrony , link duplex ca pacity , and whitebo ard capacity) are deno ted b y a tuple. F o r ex ample, “( S y nch, FW , half )-mo del” denotes the synchronous mo del with FW whiteb oards and half-duplex links. The wildca rd “ ∗ ” in the triplet deno tes all po ssibilities for the catego ry . F or example, “( ∗ , FW , half )- mo del” denotes bo th the ( S y nch, FW , half )-mo del a nd the ( Asy nch, FW , hal f )-mo del. Gossip problem s p ecification. W e cons ider the gossip pr oblem among agents: ag ent s are given so me initia l information (called gossip information ), and the go al of a proto col solving the problem is that ea ch agent dissemina tes its goss ip infor mation to every other agent in the system. Each agent can transfer the gossip information to another agent by meeting it a t a no de or by leaving the gos sip information in the whitebo ard of a no de. In the latter case, a FW whiteb oa rd is required. The g ossip information can b e r elaye d by other agents, that is, a n y agent that ha s a lr eady obtained the goss ip informatio n of another agent can transfer all collected gossip information to other a gents a nd c a n store it in the whitebo ard o f a no de. In this pap er, we consider self-st abilizing solutions for the gossip problem. The s olutions guarantee that every agent eventu al ly knows the go ssip information of all the a gents in the system even when the system is star ted from a n arbitr ary configur a tion. So, a g ent s may start from arbitra ry lo cations in a rbitrary sta tes, and the no des’ whiteb oards may initia lly contain arbitra ry infor mation. W e ass ume that k agents a re prese nt in the netw ork at a ny time, yet k is unknown to the age nts. In the sequel, the k - gossip pr oblem denotes the problem o f gossiping a mong k a gents. Quiescence num b er. W e introduce the quiesc enc e of solutions for the k -g ossip problem to describ e the fa ct that s o me agents, althoug h ex e c uting lo cal co de, s top moving at s ome po in t of any execution. Definition 1 A distribute d algorithm for mobile agents is l - quiescent (for some inte ger l ) if any ex e cut ion r e aches a c onfigu r ation after which l (or mor e) agents re main stil l for ever. Definition 2 The quiescence num ber of a pr oblem is the maximum inte ger l such that a l -quiesc ent algorithm ex ists for the pr oblem. F or c onvenienc e, the quiesc enc e numb er is c onsider e d to b e − 1 if ther e exists no 0 -quiesc ent algorithm ( i.e. , the pr oblem is not solvable). Suzuki et al. [9, 10] considere d the CW a nd FW whiteb oa rd mo dels, and showed that the difference do es no t impact the mov e complexity of non-st abilizi ng s o lutions for the go ssip problem. In this pap er, we clarify some differences a mong the NW , the CW and the FW whitebo ard models with resp ect to the quies c ence num b er of self-stabilizing solutio ns for the gossip pro blem. INRIA Quiesc en c e of Self-stabilizing Gossiping 7 3 S elf-stabilizing k -gossi ping among named agen ts Our first result obs erves tha t the self-stabilization pro per t y of a k -g ossiping pr o to col implies that a t least one mobile ag en t must keep moving forever in the system. Theorem 1 Ther e ex ists no k -quiesc ent self-stabilizing solution to the k -gossi p pr oblem in the ( ∗ , ∗ , ∗ ) -mo del. Pr o of sketch. F o r the k - gossip pr oblem to b e self-stabilizing, there m ust not exist any terminal configur ation of age n ts, i.e. a co nfiguration fro m which all the a gents never move thereafter. Assume the co n trar y , i.e. ther e ar e k age n ts (with k ≥ 2 ) in a n - s ized netw ork (with n > k ) such that a g ent a nd no des are in a configuration such that all ag e n ts do not mov e thereafter. Then we construct a 2 n - s ized netw ork by mir roring the first netw or k and joining the tw o by a no de w ith no agent on it (there exists such a no de since n > k ). By mirroring the s tates and agents as well, there exis ts a second set o f agents in the seco nd part of the netw ork that will never mov e thereafter. Since ag en ts may only communicate by meeting other a gents at the s ame no de or by using whiteb oards, the new k agents from the second g roup ar e never able to communicate with any a gent from the initial k -sized group. As agents do not hav e the knowledge of the actual num ber o f agents in the system, none of them is able to disting uis h b etw een the tw o systems, hence the result. The a bove discussion is v alid indep endently of the assumptions c o ncerning the sync hrony , the link duplex capacity , or the whiteb oar d capacity . ✷ Notice that Theorem 1 do es not hold if a gents know the n umber k o f ex isting agents. With the a ssumption of known k , it could b e p oss ible for ag en ts to stop moving when k agents are lo cated at a same no de, i.e. , k -quiescence may b e attainable if the r endez-vous of k agent s is p os sible. W e now show tha t in the asynchronous ca se, no self-s tabilizing algorithm can ensure that a t lea st one agent doe s not mov e forever. Theorem 2 Ther e exists no l -quiesc ent self-stabilizing solution, for any l (1 ≤ l ≤ k − 1) , to the k -gossi p pr oblem in ( Asy nch, ∗ , ∗ ) -mo del. Pr o of s ketch. Assume there exists a 1-quiescent self-stabilizing solutio n, that is, in any execution there exists a n age n t that do es not mov e after a certain config uration. The agent is o nly aware of the sta tes of a gents at the same no de and the conten ts o f the whiteb oard at the no de, and this informa tion is sufficient to make the agent quiesc en t. Now consider that the g raph is regular ( i.e. all no des hav e the same degree) and non trivial. So, we can construct a configuration in which every agent is quiescent. Since we consider asynchronous systems, a quiescent a g ent cannot s tart moving unles s another ag ent reaches the no de. As a res ult, the agents never meet with each other and the goss iping cannot b e achiev ed. ✷ While Theor em 2 pre cludes l - q uiescence in asynchr onous mo dels for a n y l (1 ≤ l ≤ k − 1), the impo ssibility result do es not hold for synchr onous systems. Actually , in synchronous arbitrar y netw orks, we pre sent in Algorithms 3.1, 3.2, 3.3, and 3 .4 a p ositive result: a RR n ° 6458 8 T oshimitsu Masuzawa , S´ eb ast ien Tixeuil ( k − 1 )-quiescent self-stabilizing solution to the k -goss ip pro blem with CW whiteb oar ds. The algor ithm is based o n the observ ation that gossiping can eas ily b e a chiev ed when a single age nt rep ea tedly trav erses the net work: the age nt alternates indefinitely a trav ersa l to collect information and a trav ersal to distribute informatio n. In our s cheme, each ag ent may move a ccording to a depth-firs t- tr av ersal (DFT) in the netw ork, a nd eventually a n agent with minimal identifier (a mo ng all agents) keeps traversing forever, while o ther agents even tually stop. Since the netw ork is synchronous, a sto pped ag e n t at no de u waits for the trav ersal of the minimal identifier agent a bo unded p erio d of time, then sta r ts moving if no such a gent visits u within the b ound. Each no de v has v ariables I nL ink v and OutL ink v in its whitebo ard to store infor mation ab out the DFT o f each age n t i . W e a ssume for simplicity tha t v lo cally lab els each incident link with an integer a (0 ≤ a ≤ ∆ v − 1) where ∆ v is degree of v , and v [ a ] denotes the neighbor o f v connected b y the link lab eled a . V ariables I nLink v and O utLink v hav e the following pro pe r ties:  A tuple ( i, a ) (0 ≤ a ≤ ∆ v − 1) in v a riable I nLink v of node v implies tha t agent i visited v first from v [ a ] ( i.e , v [ a ] is the pa rent o f v in the depth-first-tr ee). A tuple ( i, ⊥ ) in I nLi nk v implies that i did not v isit v yet, or that i completed the DFT part starting fr om v (and r eturned to the par ent of v in the depth-fir st-tree). F or the star ting no de of the DFT, ( i, ⊥ ) is alwa ys store d in I nLink v . W e assume that only a single tuple of each age nt i can b e stored in I nLin k v (this can b e enforced having I nLink v implemen ted through an ass o ciative memory) and we consider that the a bsence of any tuple in volving i denotes that ( i, ⊥ ) is actually present.  A tuple ( i, a ) (0 ≤ a ≤ ∆ v − 1) in v ar iable Out Link v of no de v implies that ag en t i left v fo r v [ a ] but did not return from v [ a ] ( i.e. , i is in the DFT starting fr om v [ a ]). A tuple ( i, ⊥ ) in O utLink v implies that i did no t visit v yet, or that i c ompleted the DFT part star ting fro m v (and returned to the pa r ent of v in the depth-firs t- tree). W e assume the same additional constraints as for I nLink v . In a legitimate config uration, tuples related to agent i in I nLin k v and O utL ink v of all no des induce a path from the star ting no de to the c urrently visited no de. Ho wev er, in a n arbitrar y initial configuratio n, I nLink v and O utLin k v may c ont ain arbitrar y tuples for ag ent i (several inco mplete paths, cyc le s, no starting no de, etc.). W e c ir cumv en t this problem by having ea ch a gent executing DFTs rep eatedly . In o rder to distinguish the current DFT from the previous one, e ach agent i maintains a b o olean flag t bit i that is flipped when a new DFT is initiated. Each no de v a lso ma in tains a v aria ble T tabl e v to stor e t bit i from the last visit of agent i in the form o f a tuple ( i, bit ). F or simplicity , we consider that ( i , true ) is in T tabl e v if no tuple of i is contained in T tabl e v . W e now describ e the mechanism to s top the remaining k − 1 agents. W e assume that each no de v maintains v ariables M inI D v , W ai tT v , and W aiting v in its whiteboa rd. The minim um id amo ng all agents having visited v is stored in M inI D v , and the (computed) time r equired to complete a DFT is sto red in W aitT v . The completion time of a DFT is INRIA Quiesc en c e of Self-stabilizing Gossiping 9 Algorithm 3.1 Proto co l (Part 1: constants, v ariables and timer s) constants of agent i i : id of i ; constants of node v deg v : degree of v ; local variable s of agent i t bit i : bool; // an alternating b it to distinguish the current trav ersal from the p revious one local variable s of node v T tabl e v : set of tuple s ( id, t bit ) ; // ( id, t bit ) implies th e latest visit of agen t id was done with the alternating bit t bit I nLink v : set of tuple s ( id, port ) ; // ( id, p ort ) implies agent id first came from v [ p ort ] in the current trav ersal // F or each id , only the tuple up dated last is stored // ( id, ⊥ ) is stored if v is the initial no de of t he tra versal // ( id, ⊥ ) is considered to b e stored if no ( id, ∗ ) is present OutLink v : set of tuple s ( id, port ) ; // ( id, p ort ) implies agent id wen t out from v to v [ por t ] last time it visited v // F or each id , only the tuple up dated last is stored M inI D v : agent id; // the minim um id of th e agents th at hav e visited v W aitT v : int; // The amount of time agents with the non-m in imum id should wai t W aiting v : set of agents; // The set of agents waiting for timeout at v timers of node v T imer v : count-up timer; The timer val ue is automatically increased by one at ever y round functions on the local timer of node v r eset ( T imer v ) : Reset the timer va lue to 0 r ead ( T imer v ) : Return t he timer val ue measured by the count-up timer T imer v of v as follows. Agent p with the minimum id rep eatedly mak es DFTs. When visiting v for the first time at each DFT, p sets the count -up timer of v to W aitT v and resets the timer. Even tually , p completes each DFT in 2 m rounds, where m is the num b er o f edges in the netw ork , a nd W aitT v = 2 m remains true therea fter. When visiting v , an agent p ′ finds a s maller id in M inI D v and stays at v until the timer v alue of v reaches W aitT v . Since p event ually completes each DFT in 2 m rounds, each agent other tha n p event ually remains at a no de v ( v ’s timer is r eset regularly enough to never expire). RR n ° 6458 10 T oshimitsu Masuzawa , S´ eb ast ien Tixeuil Algorithm 3.2 Proto co l (Part 2: Main b ehavior) Behavior of node v at each round for each arriving agent i do v isit v ( i ); timeout check and execute v ; Lemma 1 S tarting fr om any initial c onfigu r ation, in every ex e cut ion of Algorithms 3.1, 3.2, 3.3, and 3.4, eventual ly the agent with t he minimum identifier r ep e ate d l y depth-first- tr averses the n etwork. Pr o of sketch. Let p b e the ag ent with the minim um id (among all the agents in the system). When p visits no de v , if p ≤ M inI D v then M inI D v = p is executed. Otherwise ( i.e. when M inI D v stores an identifier that is not the id of any existing agent), p susp ends its DFT and waits for timeo ut at v ( p is app e nded in to W a iting v ). Since no a gent with the fake i d exists in the net work, re ad ( T imer v ) ≥ W aitT v even tually holds (in function timeout check an d execute v ). When this is the ca se, M i nI D v = min { j | j ∈ W aiti ng v } (= p ) is executed and p resumes the susp ended DFT. Once M inI D v is changed to p , M i nI D v never stor es an id smaller than p again. Now consider a DFT initiated by agent p with t bit p = b ( b ∈ { tr ue, f al se } ). In a legitimate configuration, p initiates a DFT fro m a no de v satisfying ( p, ⊥ ) ∈ I nLink v . How ev er, in the initial configuration, ( p, a ) ∈ I nLink v may hold for some a (0 ≤ a ≤ ∆ v − 1 ) where v is the no de p is initially lo cated at. W e first show that p even tually ter minates the DFT starting from such an initial configur ation and initiates a new DFT with t bit p = ¬ b . When p with t bit p = b vis its a no de u in a forward mov e, p changes its tuple in T tabl e u to ( p, b ) if ( p, b ) 6∈ T tabl e u . Otherwise, p backtrac ks. Since ( p, b ) in T tabl e u never changes to ( p, ¬ b ) as long as p contin ues the DFT with t bit p = b , p can make a t most m forw ar d mov es in the DFT. On the other ha nd, agent p backtracks from u to u [ a ] only whe n ( p, a ) ∈ I nL ink u holds. When backtracking fr om u to u [ a ], p changes its tuple in I nLin k u to ( p, ⊥ ). Thu s, p can ma ke a t most n backtrac king mov es in the DFT. Consequently , p event ually terminates the DFT even when it star ts the DFT fr om a no de v with ( p, ⊥ ) 6∈ I nLink v . Now consider a DFT initiated by agent i with t bit i = b a t no de v with ( i, ⊥ ) ∈ I nLin k v . Let G ′ = ( V ′ , E ′ ) b e a co nnected comp onent containing v of G ¬ b = ( V ¬ b , E ¬ b ) where V ¬ b = { u ∈ V | ( i, ¬ b ) ∈ T tabl e u when i initia tes the D F T } and E ¬ b = ( V ¬ b × V ¬ b ) ∩ E . Since the algorithm can b e viewed a s a distributed version o f a seq uen tial DFT, it means i ma kes a DFT in G ′ and its outgoing edges (if they exist). When the DFT co mpletes, the tuple of i stored in T tabl e u changes to ( i, b ) at each u in V ′ , while the tuple of i stored in T tabl e w remains unchanged at w ( 6∈ V ′ ) during the DFT. Thus, if G ′ is not the whole net work, the connected comp onent G ′′ (similarly defined as G ′ for the next DFT with t bit i = ¬ b ) co n tains at least one mo re no de tha n G ′ . Since the net work is finite, even tually i makes DFTs rep eatedly ov er the whole netw ork. ✷ INRIA Quiesc en c e of Self-stabilizing Gossiping 11 Algorithm 3.3 Proto co l (Part 3: Behavior when ag en t i arr ives at no de v fro m v [ a ]) function v isit v ( i ); // Execu ted when agent i v isits no de v from v [ a ] ( a can be any lab el initially if ( ( i, t bit i ) 6∈ T ta ble v ) { // first visit of i at v in th e current trav ersal add ( i, t bit i ) to T t able v ; add ( i, a ) to I nLink v ; if ( i ≤ M inI D v ) { M inI D v = i ; W aitT v = r ead ( T imer v ); r eset ( T imer v ); // Timer is reset to start measuring th e t ra versal time if ( deg v ≥ 2) { add ( i, next v ( a )) to O utLink v ; // next v ( a ) = ( a + 1) mo d deg v migrate to v [ next v ( a )]; } else { // deg v = 1 then backtrac k to v [ a ] add ( i, ⊥ ) to I nLink v ; migrate to v [ a ]; } } else // i > M inI D v add i to W aiting v ; } else if (( i, a ) 6∈ OutLink v ) // i prev iously v isited v in the current trav ersal, i b ac ktracks to v [ a ]. migrate to v [ a ]; // The follo wings are the cases when i backtrac ks to v from v [ a ]. else if (( next v ( a ) == 0) and (( i, ⊥ ) ∈ I nLink v )) { // v is the initial no de of i ’s t ravers al and i completes t he current tra versal if ( i ≤ M inI D v ) { M inI D v = i ; W aitT v = r ead ( T imer v ); r eset ( T imer v ); // Initiate a new t ra versal t bit i = ¬ t bit i ; add ( i, t bit i ) to T t able v ; add ( i, 0) to O utLink v ; migrate to v [0]; } else // i > M inI D v add i to W aiting v ; } else if (( i, next v ( a )) ∈ I nLink v ) { // v is not the initial no de of i ’s t ra versal, i completes the cu rrent tra versal from v add ( i, ⊥ ) to I nLink v ; add ( i, ⊥ ) to OutLink v ; migrate to v [ next v ( a )]; // i backtrac ks } else { // i did not complete the cu rrent tra verse from v add ( i, next v ( a )) to O utLink v ; migrate to v [ next v ( a )]; } RR n ° 6458 12 T oshimitsu Masuzawa , S´ eb ast ien Tixeuil Algorithm 3.4 Proto co l (Part 4: Behavior when Timeout o ccurs ) function timeout check and ex ecute v ; if r e ad ( T imer v ) ≥ W aitT v ; { // Timeout occu rs M inI D v = min { j | j ∈ W ait ing v } ; Let i be such that M inI D v = i ; W aiting v = W aiting v − { i } ; r eset ( T imer v ); // Timer is reset to start measuring th e trav ersal time if ( ( i, a ) ∈ I nLink v for some a (0 ≤ a ≤ deg v − 1)) { // v is not th e initial no de of i ’s tra versal Let a be such that ( i, a ) ∈ I nLink v ; if ( deg v ≥ 2) { add ( i, next v ( a )) to O utLink v ; i migrates to v [ nex t v ( a )]; } else { // deg v = 1 then backtrac k to v [ a ] add ( i, ⊥ ) to I nLink v ; i migrates to v [ a ]; } else { // v is the initial no de of i ’s trave rsal // Initiate a new t ra versal t bit i = ¬ t bit i ; add ( i, t bit i ) to T t able v ; add ( i, 0) to O utLink v ; migrate to v [0] ; } } INRIA Quiesc en c e of Self-stabilizing Gossiping 13 Theorem 3 The pr oto c ol define d by Algori thms 3.1, 3.2, 3.3, and 3.4 is a ( k − 1 ) -quiesc ent self-stabilizing solution to the k -gossip pr oblem in arbitr ary networks in the ( S y nch, CW , ∗ ) - mo del. Pr o of sketch. Let p b e the agent with the minim um i d . F rom Lemma 1, even tually p makes DFTs rep eatedly ov er the whole netw ork. Once p completes the DFT, M inI D v never bec omes smalle r than p a t any no de v . Now consider p ’s DFT of the whole netw ork that is initiated at a configuration satisfying M inI D v ≥ p at every no de v . Then, p rep eatedly p erforms DFTs without waiting at any no de, and p completes each DFT in 2 m rounds. This implies that timeout never o ccurs at any no de starting fr o m the second DFT. An y agent q o ther than p susp ends its DFT when visiting any no de u . Agent q can retur n to its susp ended traverse only when timeo ut o c c ur s at u . How ever, sinc e timeout never o ccurs at u , q never r eturns to its susp e nded trav erse and rema ins at u fo rever. ✷ T o complete our results for the synchronous case, let us obse rve that in the ( S ynch , CW , ∗ ) and ( S ynch, FW , ∗ ) mo dels, the quiescence num ber of the k -goss ip pr oblem a mong na med agents is k − 1 (b y Theor ems 1 and 3). There r emains the ca se o f NW whiteb oards, un- fortunately the following theorem show that when the memory of agents is b ounded (the bo und may dep end on the netw ork size n ), the k -gossip pro blem a mong named agents is not solv able. Theorem 4 The quiesc enc e nu m b er of t he ( ∗ , NW , ∗ ) -mo del is − 1 for the k -gossip pr oblem among n ame d agents, when state sp ac e of e ach agent is b ounde d (but may dep end on the network size n ). Pr o of sketch. W e prov e the imp ossibility for synchronous ring netw orks. W e assume for the purp ose of contradiction that a 0- quiescent s olution exists, and that each agent has at mos t s states. Notice that s is no t neces s arily a constant and may dep end on the netw ork size. W e consider system exe c utions where each agent sta r ts its execution from a predeter- mined state. Since no informatio n ca n b e s to red in the whiteb oards (mo del NW ), the behavior of an agent dep ends so lely on its own state and id (the netw ork b eing regula r). When an agent executes an action, it changes its sta te then (p otentially) mov es (clo ckwise or counterclo ckwise). Since e a ch agent ha s at most s states, it rep eats a cyclic execution of at most length s unless the ag e n t meets a no ther agent. Since only three kinds of moves ar e po ssible, there e x ists at most 3 s +1 moving patterns in the cy clic b ehavior of length s or les s . Now w e consider a sufficiently large domain of agent identifiers ( e.g. k × 3 s +1 ). All p ossible agents a re par titioned into at most 3 s +1 groups dep ending on their moving patter ns, and th us, some gr oup cont ains k o r more ag ent s. Now consider k age nts in the gr oup of size k or more, that are placed regular ly in different no des in the initial co nfiguration o f the no des. Since agents in the group makes the same moving pattern in the cyc le , the agents rep eat the cyclic action without meeting each other in the synchronous ex e cution. In the mo dels with the whiteb oards NW , the gossiping ca nnot b e achiev ed without meetings of agents, which is a contradiction. ✷ RR n ° 6458 14 T oshimitsu Masuzawa , S´ eb ast ien Tixeuil Note that the imp ossibility result holds even though the agents all start from a well known predefined initia l sta te. Thus, if the initial lo cation of age n ts is not controlled, even non-stabilizing solution ar e imp ossible to design. F or asynchr onous mo dels , the rema ining question is ab out the p os sibilit y o f 0 - quiescence. Theorem 5 The quiesc en c e numb er of ( Asy nch, CW , f ul l ) and ( Asy nch, NW , f ul l ) mo del is − 1 for the k -gossip pr oblem among n ame d agents. Pr o of s ketch. W e show that there exists no 0- quiescent s elf-stabilizing so lution to the k -go s sip problem in ( Asy nch, CW , f ul l )-mo del. Let us assume for the purpo se of contradiction that there ex ists a 0-quiescent self-stabilizing solution. All k agen ts must keep moving in the 0-quiescent s olution since 1- q uiescence is imp ossible fro m Theorem 2. Now co nsider a particular a gent p . In the asynchronous s ystem with ful l-duplex links, there exists a n exec ution such that p never meets any o ther ag en t: b efor e p reaches a no de u , all the agents staying at u leave u . Notice that full-duplex links allow the ag en ts to leave u without meeting p : scheduling a llows to ha ve all a gents exiting u by the s a me link us e d by p to arrive at u to b e moving co nc ur rently w ith p . It follows that in the execution, a g ent p ca nnot dissemina te its own information (agents hav e to meet one a nother in CW mo del). Hence the res ult. ✷ Theorem 6 The quiesc en c e nu mb er of ( Asy nch, FW , ∗ ) -mo del is 0 for the k - gossip pr oblem among name d agents. Pr o of sketch. Theorems 2 shows that 1- quiescence is imp oss ible. Th us, it is sufficient to present a 0-quie s cent self-stabilizing solution in ( Asy nch, FW , ∗ )-mo del. Consider the following proto col outline. E very a gent rep eatedly p erforms DFTs of the net work. When an a gent v isits a no de, it stores its g o ssip informatio n in the whiteboa rd a nd collects the gos sip informatio n sto r ed in the whiteb oard. After a DFT has b een co mpleted by every agent, a ll whitebo ards contain the g o ssip information of all the a gents, and every agent can obta in all the go ssip informa tio n by per forming a n additional DFT. The self-stabilizing DFT can b e realiz e d in the same way as the proto col presented in Theorem 3 : each agent simply b ehav es a s the agent with the minimum id of the pro to col, yet do es not need to wait at any no de. ✷ Theorem 7 The quiesc enc e num b er of ( Asy nch, CW , hal f ) -mo del is 0 for the k -gossip pr oblem among n ame d agents. Pr o of sketch. Theorems 2 shows that 1-quiescence is impo ssible to attain. Thus, it is sufficient to pres en t a 0-quies cent self-stabilizing solution in ( Asy n ch, CW , half )-mo del. Consider the following proto col outline. E very a gent rep eatedly p erforms DFTs of the net work while reco rding at every traversed no de the last tar geted neig h b oring no de. By the recorded information, other agents can trace a particular agent. When a n agent visits INRIA Quiesc en c e of Self-stabilizing Gossiping 15 a no de and finds a smaller i d than its own, it starts tr acing the agent with the smaller id . Even tually all the ag en t other than age n t p (that ha s minimal id ) co n tinue tra cing p , that in turns p erform a DFT forever. Since we assume the half-duplex edges, agents cannot miss one another on a link, and agents p erform the same DFT and the agent with minimal i d . Then a similar a rgument as in [2] implies that a ll agents other tha n p meet p infinitely often. Thu s, by mea ns of agent p , every agent ca n disseminate its g ossip information to all other agents. The self-stabilizing DFT can b e realiz e d in the same way as the proto col presented in Theorem 3. The only difference is in the way to detect the fake i d s. In the pro toc o l of Theorem 3, fake i d s ar e detected by a timeout mechanism. Here, each a gent recor ds at ea ch no de the distance from the starting node in the depth-first-tree. In any tra ce lab eled with a fake id , the tracing a gent ev entually detects contradiction in the distances and then decides that the traced id is a fake one. Agent p detecting a fake id erases the false rec ords on the path p traced. ✷ 4 S elf-stabilizing k -gossi p among anon y mou s agen ts Named ag ent s b eing a stronger assumption than a nonymous ag e n ts, all the impo ssibility results for na med agents also hold for a nonymous agents. In this section, we consider only the mo del v ariations that the imp ossibility results for named agents do not cov er. Theorem 8 The quiesc enc e numb er of ( ∗ , CW , ∗ ) -mo del is − 1 for t he k -gossip pr oblem among anonymous agents. Pr o of s ketch. Consider a synchronous ring net work where all the whitebo ards of no des contain the same initial informatio n. Assume that all the a gents ar e in the sa me state in the initial configur ation. In the s ynchronous sy s tem, all the agents mov e exa ctly the same and they never meet each other , and thus, the gossiping ca nnot b e completed. ✷ Theorem 9 The quiesc en c e nu mb er of ( Asy nch, FW , ∗ ) -mo del is 0 for the k - gossip pr oblem among anonymous agents. Pr o of sketch. F rom Theo rem 2, it is sufficient to present a 0-quiescent self-stabilizing solution to the goss ip problem in ( Asy nch, FW , ∗ )-mo del. Since the whiteb oards FW is av ailable, the k -goss iping ca n be completed if every agent rep eatedly traverses the net work. Ho wev er, an anonymous agent canno t recor d at a no de that it has visited the no de s inc e its r e cord canno t be distinguished from that of others. Thu s, a nonymous ag en ts canno t execute the DFT like the ones in Theorem 3. Instea d, each a gent can trav erse all the paths of a given length, say ℓ , using the link la bels ( i.e. , trav erse all the paths in the lexico graphic order of the lab el sequences). When completing the trav erse of the paths of length ℓ , the ag ent starts traversing the paths of length ℓ + 1. RR n ° 6458 16 T oshimitsu Masuzawa , S´ eb ast ien Tixeuil By rep eating the tr av erses with incrementing the length, even tually the a gent can trav erse the who le netw ork. ✷ F o r the synchr onous anonymous a gents, Theor e m 9 guara n tees that the quie s cence n um- ber is a t least 0. On the other hand, the imposs ibilit y of k -quiescence for synchr onous name d agents (Theor em 1) leads to the following theorem. Theorem 10 The quiesc enc e numb er of ( S y nch, FW , ∗ ) -mo del is not lar ger than k − 1 and not smal l er than 0 for the k -gossip pr oblem among anonymous agents. ✷ 5 Conclus ion This pap er introduced the notion of quiescence for mobile agent pro toc ols in a self-stabilizing setting. This notion complements the notion of silence [5] used in “classica l” self-stabilizing proto cols. While k - quiescence of k - gossiping a mong named agents is easily attainable in non-stabilizing so lutions (assuming FW a nd CW whiteb oards) [9, 10 ], this pap er shows that self-stabilization pr even ts k -quiescent so lutions in any consider ed mo del, and ev en 0- quiescent solutions in some particula r mo dels. Thus, our pap er s hed new light on the inherent difference betw een non-stabilizing and self-stabilizing so lutions of ag ent -base d sys- tems. W e would like to po in t out interesting op en questions: 1. What is the exact quiescence num b er of the ( S y nch, FW , ∗ )-mode l for the k -g ossip problem among anonymous ag ent s? (b esides b e ing no t smaller than 0 and not la rger than k − 1) 2. What is the co nnection b etw een the quiescence n umber and the top olo gy ? 3. Do es ther e exist a non-trivia l non-s t abilizing problem with quiescence num be r low er than k ? References [1] J. Beauquier, T. Herault, and E. Schiller. Easy stabiliza tion with a n ag ent . In Pr o c e e d- ings of the 5th Workshop on Self-Stabilizing Systems (WSS) , pages 35– 51, 200 1. [2] L. Blin, M. Gra dinariu Potop-Butucaru, a nd S. Tixeuil. On the self-stabilization of mobile rob ots in graphs. In Pr o c e e dings of O PODIS , pages 301– 314, 2 007. [3] C. Delp orte-Galle t, S. Devismes, and H. F auconnier. Robust sta bilizing leader election. In Pr o c e e dings of the 9th International Symp osium on Stabilization, Safety, and Se cu rity of Dist ribute d Systems (S SS) , pages 219– 233, 2 007. [4] S. Dolev. Self-st abilization . MIT Press, Ma rch 200 0. INRIA Quiesc en c e of Self-stabilizing Gossiping 17 [5] S. Dolev, M. G. Gouda, a nd M. Schneider. Memory requirements for silent stabilization. A cta Inf. , 36(6):44 7 –462, 1999. [6] S. Dolev, E. Schiller, a nd J. W elc h. Random walk for self-stabilizing gr oup communi- cation in ad-ho c netw orks. pages 70–7 9, 2 0 02. [7] S. Ghosh. Agents, distributed algo r ithms, and s tabilization. pages 242–2 51, 2000. [8] T. Herman a nd T. Masuzaw a. Self-stabilizing agent trav ersal. pa g es 15 2–166 , 2001 . [9] T. Suzuki, T. Izumi, F. Oo shita, H. Kak ug aw a, and T. Masuzawa. Mov e-optimal gossiping among mobile ag ent s. The or etic al Computer Scienc e (to app e ar) . [10] T. Suzuki, T. Izumi, F. Oos hita, H. Kakugawa, and T. Masuzaw a. Optima l mov es for gossiping among mobile ag ent s. In Pr o c e e dings of SIROCCO , pages 151–1 65, 20 07. RR n ° 6458 Unité de recherche INRIA Futurs Parc Club Orsay Uni versité - ZA C des V ignes 4, rue Jacques Monod - 9189 3 ORSA Y Cedex (France) Unité de reche rche INRIA Lorraine : LORIA, T echnop ôle de Nancy-Brab ois - Campus scienti fique 615, rue du Jardin Botani que - BP 101 - 54602 V illers-lès-Nanc y Cede x (France) Unité de reche rche INRIA Rennes : IRISA, Campus univ ersitaire de Beaulieu - 35042 Rennes Cedex (France ) Unité de reche rche INRIA Rhône-Alpes : 655, avenu e de l’Europe - 38334 Montbonnot Saint-Ismier (France) Unité de recherch e INRIA Rocquen court : Domaine de V oluceau - Rocquenco urt - BP 105 - 78153 Le Chesnay Cede x (France) Unité de reche rche INRIA Sophia Antipolis : 2004, route des Lucioles - BP 93 - 06902 Sophia Antipolis Cedex (France) Éditeur INRIA - Domaine de V olucea u - Rocquenc ourt, 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