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

loosely stabilizing leader election with polylogarithmic
SMART_READER_LITE
LIVE PREVIEW

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.


slide-1
SLIDE 1

Loosely-stabilizing Leader Election with Polylogarithmic Convergence Time

Yuichi Sudo1, Fukuhito Ooshita2, Hirotsugu Kakugawa1, Toshimitsu Masuzawa1, Ajoy K. Datta3, Lawrence L. Larmore3

  • 1. Osaka University, Japan
  • 2. NAIST, Japan
  • 3. The University of Nevada, Las Vegas, USA

OPODIS 2018

slide-2
SLIDE 2

What is “Population Protocol Model”?

2

slide-3
SLIDE 3
  • 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

3

[AAD+06] D. Angluin, J Aspnes, Z. Diamadi, M.J. Fischer, and R. Peralta. Computation in networks

  • f passively mobile finite-state sensors. Distributed Computing, 18(4):235–253, 2006.

A flock of birds Molecular computing

Population Protocol Model [AAD+06]

slide-4
SLIDE 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

4

1 1 1 1 1 1 1 2 3 1 1 1 2 2 3 1 3 1 2 5 3 5 3 1 2 5 3 5 1 1

slide-5
SLIDE 5

Scheduler

  • The uniformly random scheduler
  • Chose the ordered pair to interact at each step

uniformly at random

5

1 1 1 1 1 1 1 2 3 1 1 1 2 2 3 1 3 1 2 5 3 5 3 1 2 5 3 5 1 1

2nd step 1st step 3rd step 5th step 4th step Scheduler

slide-6
SLIDE 6

What is “Leader Election Problem”?

6

slide-7
SLIDE 7

Leader Election Problem

7 Electing exactly one leader

Goal Keeps the single leader single leader

leader follower

Elect one leader eventually

slide-8
SLIDE 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

8

parallel time = #steps #agents If E[#steps] = 120 and #agents =6 20 parallel time single leader

slide-9
SLIDE 9

Two Categories

  • 1. Non-stabilizing leader election (LE)
  • All agents are in the same state initially
  • 2. Self-stabilizing leader election (SS-LE)
  • Agents may be in different states initially

9

8 6 2 7 9 9

single leader

1 1 1 1 1 1 7 7 8 8 6 1

single leader

2 6 9 1 8 2

leader follower

slide-10
SLIDE 10

Two Categories

  • 1. Non-stabilizing leader election (LE)
  • All agents are in the same state initially
  • 2. Self-stabilizing leader election (SS-LE)
  • Agents may be in different states initially

10

8 6 2 7 9 9

single leader

1 1 1 1 1 1 7 7 8 8 6 1

single leader

2 6 9 1 8 2

slide-11
SLIDE 11

Non-stabilizing Leader Election

Paper

  • Conv. Time

expected or w.h.p #states

[AAD+06]

  • Expected

1

[AG15]

log Expected log

[BKKO18]

log Both log

[GS18]

log w.h.p. log log

[GSU18]

log ⋅ log log Expected log log

[SOI+18]

Expected

11

[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

  • ptimal leader election in population protocols, arXiv:1802.06867v2

[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.

slide-12
SLIDE 12

Two Categories

  • 1. Non-stabilizing leader election (LE)
  • All agents are in the same state initially
  • 2. Self-stabilizing leader election (SS-LE)
  • Agents may be in different states initially

12

8 6 2 7 9 9

single leader

1 1 1 1 1 1 7 7 8 8 6 1

single leader

2 6 9 1 8 2

slide-13
SLIDE 13

Convergence Closure

Self-stabilizing Leader Election (SS-LE)

single leader

any configuration safe configuration

leader follower

Reach a safe configuration eventually starting from any configuration Keep a single leader forever after the convergence

13

slide-14
SLIDE 14

Impossibility Results [AAFJ15]

No SS-LE protocols exists unless every agent knows #agents exactly

Impossibility Theorem [AAFJ15]

We cannot design any practical SS-LE protocol because knowledge of exact is not practical for many applications…

14

slide-15
SLIDE 15

Is there any way to design practical and fault tolerant leader election protocol?

15

Yes! We can use loose-stabilization!

slide-16
SLIDE 16
  • May deviate from the specification even after the convergence
  • But deviation happens only after an extremely long time

(in expectation)

Loose-stabilization [SNY+09]

single leader

any configuration safe configuration

short Extremely long

May deviate!

Loosely-stabilizing Leader Election (LS-LE)

16

slide-17
SLIDE 17

The Power of Loose-stabilization

17

  • Knowledge of exact #agents is no longer required
  • Only an upper bound of #agents is needed

→ Practical assumption

  • Linear convergence time and exponential deviation time!

Convergence Time Deviation Time expected

  • r w.h.p

#states

[SNY+09]

log Ω expected

  • [Izumi15]
  • Ω

expected

  • LS-LE protocols
slide-18
SLIDE 18

Lower Bound [Izumi15]

  • Linear convergence time protocol [Izumi,2015] is optimal

if we want an exponential deviation time

18

Any protocol with

deviation time

requires convergence time

Lower Bound Theorem [Izumi, 2015]

slide-19
SLIDE 19

Our Contribution

  • 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

is a constant parameter

Convergence Time Deviation Time expected

  • r w.h.p

#states

[SNY+09]

log Ω expected

  • [Izumi15]
  • Ω

expected

  • New!

  • expected

LS-LE protocols

slide-20
SLIDE 20
  • 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

20

SINGLE LEADER

any configuration safe configuration

  • leader

follower

Our Contribution

slide-21
SLIDE 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

slide-22
SLIDE 22

Virus War Mechanism

22

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

Multiple leaders → Decrease #leaders to one

Goal

slide-23
SLIDE 23

Basic Idea

slide-24
SLIDE 24

Basic Idea

24

10 leaders 10 leaders 6 leaders 6 leaders 3 leaders Create Create Mask breaks

slide-25
SLIDE 25

Implementation (1/3)

  • Every leader has variable . timer ∈ 0,1, … ,
  • Every time interacts, . timer decreases
  • When . timer reaches 0, resets its timer and…
  • If it is an initiator, it creates virus and wears a mask
  • If it is a responder, its mask breaks

25

38 37 1 100 1 100 same prob.

slide-26
SLIDE 26

Implementation (2/3)

  • Each virus has its TTL (Time To Live)
  • The TTL of a new virus is
  • Viruses are propagated with decreasing TTL

26

e.g.) 100 100 100 77 77 49 49 78 15 50 1 Propagate Replace Dissapear

slide-27
SLIDE 27

Implementation (3/3)

  • A leader without a mask is killed by a virus
  • A leader with a mask is never killed

27

93 92 92 93 92 92

Become a follower Remain a leader

slide-28
SLIDE 28
  • Provided that we set

Analysis (1/3)

28

  • Every time a new virus is created, it propagates to the

whole population and disappears in ⋅ time Created Pervaded Disappears

Lifecycle of viruses

slide-29
SLIDE 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

29

  • Smaller leads to

faster convergence

slide-30
SLIDE 30

Analysis (3/3)

  • But, we cannot set arbitrarily small
  • A single leader may kill itself if
  • i.e., the single leader is killed by a virus that it created itself
  • If we set ⋅ ,

Chernoff bound guarantees that suicides never happens for an exponentially long time in () time)

30

  • Viruses disappear
slide-31
SLIDE 31

Set Parameter

  • We must satisfy
  • so that a virus propagates to the whole

population

  • ⋅ so that a single leader never

kills itself

  • If we set Θlog and Θ log ,

31

NO KILL

slide-32
SLIDE 32

Summary

32

SINGLE LEADER

  • No timeout to create a leader

& No suicide of a single leader

slide-33
SLIDE 33

Conclusion

  • Break through the lower bound of liner conv. time, and

achieve polylog convergence time

  • Deviation time is no longer exponential,

but arbitrarily large polynomial

33

is a constant parameter

Convergence Time Deviation Time expected

  • r w.h.p

#states

[SNY+09]

log Ω expected

  • [Izumi15]
  • Ω

expected

  • New!

  • expected

LS-LE protocols

slide-34
SLIDE 34

34

slide-35
SLIDE 35

35

slide-36
SLIDE 36

Strategy

1) No leader → Create a leader by timeout mechanism

  • Thereafter, do not create more leaders (for sufficiently long time)

2) Multiple leaders → Decrease #agents to one by virus war mechanism

  • Thereafter, do not delete the single leader (for sufficiently long time)

36

slide-37
SLIDE 37

Timeout Mechanism

Basic Idea

  • Each agent has a countdown timer

to detect the absence of a leader

  • The value of the timer is decreasing but

it is reset if an agent meets a leader

  • A follower becomes a leader

when it observes timeout!

37

No leader → Create a leader

Goal

slide-38
SLIDE 38

Implementation

  • Every agent have variable . time ∈ 0,1, … ,
  • A leader always keeps the full timer value
  • If a follower interacts with an agent ,

then . timer ← max 0, . timer 1, u.timer1

  • When timeout happens, an agent becomes a leader

38

83 100 3 97 100 e.g.) 100 6 82 82 1 1 100 100 25 56

slide-39
SLIDE 39

Analysis

  • When no leader exists,

→ The maximum timer value decreases by one within expected time → Timeout happens within ⋅ expected time

39

90 89 88 78 83 30 32 30 26 26 1 1 2 3 2 100 100 98 98 99

  • A leader is created!
slide-40
SLIDE 40

Question

  • When no leader exists, a leader is created within

⋅ log expected time

  • Hence, smaller leads to faster convergence
  • However, too small leads to frequent timeout even

when a leader exists → short deviation time

40

2 2 2 2 2 2 2 1 1 1 1 2 2 1 2 1 2 2 2 2

timeout! timeout! timeout!

How large

is enough

to avoid short deviation time?

e.g.) 2

slide-41
SLIDE 41

Answer

  • When at least one leader exists and Ωlog ,

→ All agents have high timer value most of the time → Timeout does not happens for time

41 Logarithmic value is enough for to keep the timers of all agents high

NO TIMEOUT

  • When we assign log for parameter …