loosely stabilizing leader election with polylogarithmic
play

Loosely-stabilizing Leader Election with Polylogarithmic Convergence - PowerPoint PPT Presentation

OPODIS 2018 Loosely-stabilizing Leader Election with Polylogarithmic Convergence Time Yuichi Sudo 1 , Fukuhito Ooshita 2 , Hirotsugu Kakugawa 1 , Toshimitsu Masuzawa 1 , Ajoy K. Datta 3 , Lawrence L. Larmore 3 1. Osaka University, Japan 2.


  1. OPODIS 2018 Loosely-stabilizing Leader Election with Polylogarithmic Convergence Time Yuichi Sudo 1 , Fukuhito Ooshita 2 , Hirotsugu Kakugawa 1 , Toshimitsu Masuzawa 1 , Ajoy K. Datta 3 , Lawrence L. Larmore 3 1. Osaka University, Japan 2. NAIST, Japan 3. The University of Nevada, Las Vegas, USA

  2. What is “Population Protocol Model”? 2

  3. Population Protocol Model [AAD+06] • Represent a network of passively mobile devices • Each device moves but cannot control its movement • Basically, a network consists of vast number of tiny devices A flock of birds Molecular computing 3 [AAD+06] D. Angluin, J Aspnes, Z. Diamadi, M.J. Fischer, and R. Peralta. Computation in networks of passively mobile finite-state sensors. Distributed Computing, 18(4):235–253, 2006.

  4. Population Protocol Model [AAD+06] • Population • Consists of a vast number of identical and anonymous finite state machines ( agents ) • Execution • At each step, one pair of agents has an interaction • one agent is an initiator , the other is a responder • Their states are updated according to transition function 1 1 2 2 2 1 1 3 3 1 1 2 2 5 5 1 3 3 3 3 1 1 1 1 1 1 1 1 5 5 4

  5. Scheduler • The uniformly random scheduler • Chose the ordered pair to interact at each step uniformly at random 1 st step 2 nd step 3 rd step 4 th step 5 th step 1 1 2 2 2 1 1 3 3 1 1 2 2 5 5 1 3 3 3 3 1 1 1 1 1 1 1 1 5 5 5 Scheduler

  6. What is “Leader Election Problem”? 6

  7. Leader Election Problem Goal Electing exactly one leader single leader Elect one leader Keeps the single leader eventually leader follower 7

  8. Time Metrics • Basically, detecting termination is impossible in the PP model • Instead, evaluate the expected convergence time during which the output of the population converges • Usually, evaluated in terms of parallel time parallel time = #steps #agents single leader If E [#steps] = 120 20 parallel time and #agents =6 8

  9. leader Two Categories follower 1. Non-stabilizing leader election (LE) • All agents are in the same state initially 1 8 1 9 1 6 single leader 1 2 1 9 1 7 2. Self-stabilizing leader election (SS-LE) • Agents may be in different states initially 2 7 8 6 6 7 single leader 9 8 2 1 1 8 9

  10. Two Categories 1. Non-stabilizing leader election (LE) • All agents are in the same state initially 1 8 1 9 1 6 single leader 1 2 1 9 1 7 2. Self-stabilizing leader election (SS-LE) • Agents may be in different states initially 2 7 8 6 6 7 single leader 9 8 2 1 1 8 10

  11. Non-stabilizing Leader Election Paper Conv. Time expected or w.h.p #states ���� ��1� Expected [AAD+06] ��log � �� ��log � �� Expected [AG15] ��log � �� ��log �� Both [BKKO18] ��log � �� ��log log �� w.h.p. [GS18] ��log � ⋅ log log �� ��log log �� Expected [GSU18] ����� �� ����� �� Expected [SOI+18] [AG15] Dan Alistarh and Rati Gelashvili. Polylogarithmic-time leader election in population protocols. In Proceedings of the 42nd International Colloquium on Automata, Languages, and Programming, pages 479–491. Springer, 2015 [BKKO18] P. Berenbrink, D. Kaaser, P. Kling, and L. Otterbach. Simple and efficient leader election. In SOSA, pages 9:1–9:11, 2018. [GS18] L. Gąsieniec and G. Stachowiak. Fast space optimal leader election in population protocols. In SODA, pages 2653–2667, 2018. [GSU18] ] L. Gąsieniec, G. Stachowiak, and P. Uznanski. Almost logarithmic expected-time space optimal leader election in population protocols, arXiv:1802.06867v2 11 [SOI+18] Y. Sudo, F. Ooshita, T. Izumi, H. Kakugawa, and T. Masuzawa. Logarithmic Expected-Time Leader Election in Population Protocol Model, to be submitted.

  12. Two Categories 1. Non-stabilizing leader election (LE) • All agents are in the same state initially 1 8 1 9 1 6 single leader 1 2 1 9 1 7 2. Self-stabilizing leader election (SS-LE) • Agents may be in different states initially 2 7 8 6 6 7 single leader 9 8 2 1 1 8 12

  13. Self-stabilizing Leader Election (SS-LE) leader follower any configuration safe configuration single leader Closure Convergence Keep a single leader Reach a safe configuration forever after the eventually starting from any configuration convergence 13

  14. Impossibility Results [AAFJ15] Impossibility Theorem [AAFJ15] No SS-LE protocols exists unless every agent knows #agents exactly We cannot design any practical SS-LE protocol because knowledge of exact is not practical for many applications… 14

  15. Is there any way to design practical and fault tolerant leader election protocol? Yes! We can use loose-stabilization ! 15

  16. Loose-stabilization [SNY+09] • May deviate from the specification even after the convergence • But deviation happens only after an extremely long time (in expectation) Loosely-stabilizing Leader Election (LS-LE) any configuration May deviate! safe configuration single leader short Extremely long 16

  17. The Power of Loose-stabilization • Knowledge of exact #agents is no longer required • Only an upper bound � of #agents is needed → Practical assumption LS-LE protocols Convergence Deviation expected #states Time Time or w.h.p Ω � � ��� log �� ���� [SNY+09] expected Ω�� � � ���� ���� [Izumi15] expected • Linear convergence time and exponential deviation time ! 17

  18. Lower Bound [Izumi15] Lower Bound Theorem [Izumi, 2015] � deviation time Any protocol with requires convergence time • Linear convergence time protocol [Izumi,2015] is optimal if we want an exponential deviation time 18

  19. Our Contribution LS-LE protocols Convergence Deviation expected #states Time Time or w.h.p Ω � � ��� log �� ���� expected [SNY+09] Ω�� � � ���� ���� expected [Izumi15] ��� ⋅ ��� � �� expected ��� � ��� � �� ���� ��� � New! is a constant parameter • Break through the lower bound of liner conv. time, and achieve polylog convergence time • Deviation time is no longer exponential, but sufficiently large polynomial 19

  20. Our Contribution • We can arbitrarily increase deviation time with a constant parameter • e.g., if we assign � � 10 , ��� then we get deviation time and ��log � �� convergence time leader any configuration safe configuration follower SINGLE LEADER ��� � 20

  21. Strategy 1) No leader → Create a leader by timeout mechanism • Thereafter, do not create more leaders (for sufficiently long time) 2) Multiple leaders → Decrease #leaders to one by virus war mechanism • Thereafter, do not delete the single leader (for sufficiently long time) 21

  22. Virus War Mechanism Goal Multiple leaders → Decrease #leaders to one Basic Idea • Leaders try to kill each other by VIRUSES • Each leader periodically makes a coin flip • With probability ½, it make a virus and wears a new mask • With probability ½, its mask breaks if it has • Viruses propagate to the whole population killing all unmasked leaders and disappears thereafter • At each interval, #leaders decreases by half 22

  23. Basic Idea � � � � � �

  24. Basic Idea Create 10 leaders 10 leaders 6 leaders Create Mask breaks 24 6 leaders 3 leaders

  25. Implementation (1/3) • Every leader � has variable �. timer � ∈ �0,1, … , � ���� � • Every time � interacts, �. timer � decreases 37 38 • When �. timer � reaches 0, � resets its timer and… • If it is an initiator , it creates virus and wears a mask 100 1 • If it is a responder , its mask breaks 100 1 same prob. 25

  26. Implementation (2/3) • Each virus has its TTL (Time To Live) • The TTL of a new virus is � ����� e.g.) � ����� � 100 100 100 • Viruses are propagated with decreasing TTL 78 77 77 Propagate 50 15 49 49 Replace 1 Dissapear 26

  27. Implementation (3/3) • A leader without a mask is killed by a virus 93 92 92 Become a follower • A leader with a mask is never killed 93 92 92 Remain a leader 27

  28. Analysis (1/3) Every time a new virus is created, it propagates to the whole population and disappears in ��� ����� ⋅ ��� �� time • Provided that we set � ����� � ����� �� Lifecycle of viruses Created Pervaded Disappears 28 �����

  29. Analysis (2/3) • Every ��� ���� � time, every leader tries to make a virus, and fails with probability ½, which breaks its mask • If it fails, it is killed in the next ��� ���� � time with constant probability if another leader exists • Hence, #agents decreases almost by half in every ��� ���� � time → the unique leader is elected in ��� ���� ⋅ log �� Smaller � ���� leads to faster convergence ���� 29

Recommend


More recommend