Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Leader Election Krishnendu Mukhopadhyaya Indian Statistical Institute, Kolkata.

Similar presentations


Presentation on theme: "Distributed Leader Election Krishnendu Mukhopadhyaya Indian Statistical Institute, Kolkata."— Presentation transcript:

1 Distributed Leader Election Krishnendu Mukhopadhyaya Indian Statistical Institute, Kolkata

2 Outline Distributed Systems Distributed Systems: Issues Leader Election – Synchronous ring – LCR Algorithm – HS Algorithm – TimeSlice Algorithm – VariableSpeeds Algorithm – Flooding Geometric Leader Election of Swarm Robots

3 Distributed Systems A collection of computing elements with no common clock or memory.

4 Distributed Systems: Issues Timing Model  Synchronous / Asynchronous / Semi-sync Failure Model  Complete / Transient / Byzantine Unknown number of processes Unknown topology Uncertain message delivery times Unknown message ordering

5 Leader Election unique A set of processes agree on a unique process as the leader. Required for  Token regeneration  Central process selection  Execute a task  etc.

6 Leader Election: Synchronous Ring 0 3 2 1 n-1 n-2 4 5

7 Leader Election: Synchronous Ring Variations:  Ring Unidirectional / Bidirectional  No. of processes known / unknown  Processes identical / have UID Restriction on manipulation of UID

8 Leader Election: Synchronous Ring Theorem: Let A be a system of n processes (n>1) arranged in a bidirectional ring. If all processes in A are identical, then A does not solve the leader- election problem.

9 Leader Election: Synchronous Ring Proof: Suppose A solves the leader-election problem. Consider an execution of A with identical start states. If any process reaches “LEADER” status after r rounds, all processes reach the same state.

10 LCR Algorithm (Le Lann – Chang – Roberts)  Unidirectional communications  Knowledge about n not required  Only comparison of UIDs  Only leader outputs result Algorithm  Each process send its UID along the ring  If UID(recd) < UID(i) discard message

11 LCR Algorithm: Correctness Lemma: Process i max outputs leader by end of round n. Assertion: For 0 ≤ r ≤ n-1, after r rounds, send i max + r = UID max Assertion: After n rounds, status i max = leader

12 LCR Algorithm: Correctness Lemma: No process other than i max outputs the value leader. Assertion: After r rounds, if i = i max and j ∈ [i max, i) then send j ≠ UID i

13 LCR Algorithm: Correctness Theorem: LCR solves the leader-election problem. Complexity:  n rounds till leader is elected  communication complexity O(n 2 ) messages

14 HS Algorithm Hirschberg – Sinclair  Bidirectional ring  Ring size unknown  Operates in phases 0, 1,2,...  Works for variable start times

15 HS Algorithm Algorithm for process i  Initiates only if it received back both of its tokens in the last phase.  In phase k sends tokens containing UID i in both directions. Tokens are intended to travel distance 2 k and return.  If it receives outbound token UID j then If i > j then discards token If i < j then forwards token If i = j then elects itself leader.

16 HS Algorithm: Message Complexity Phase 0: 4n messages Phase k (k>0): In a group of consecutive 2 k-1 +1 processes, at most one goes on to initiate in phase k. At most ⌊ n/(2 k-1 +1) ⌋ processes initiate tokens in phase k. Total number of messages in phase k is 4.2 k ⌊ n/(2 k-1 +1) ⌋ ≤ 8n. Total number of messages is ≤ 8n (1 + ⌈ log n ⌉ ), which is O(n log n).

17 HS Algorithm: Time Complexity Time for Phase k: 2. 2 k = 2 k+1 Time for last-but-one Phase: 2 log n+1 Time for final Phase: n (only outbound traffic) Total time complexity is O(n).

18 TimeSlice Algorithm Features:  Selects leader in less than O(n log n) messages  UIDs are positive integers; can be manipulated like general arithmetic operations  Ring size n is known to all processes  Unidirectional ring

19 TimeSlice Algorithm Algorithm:  Runs in phases 1, 2,..., each of n rounds  Phase v has rounds (v-1)n +1,..., vn  In phase v, process with UID v (if it exists), elects itself leader, if it has not received any non-null message. Complexity:  Messages: n messages  Time: n. u min (unbounded)

20 VariableSpeeds Algorithm Features:  Selects leader using O(n) messages  UIDs are positive integers; can be manipulated like general arithmetic operations  Ring size n is not known  Unidirectional ring

21 VariableSpeeds Algorithm Algorithm:  Each process creates a token with its UID  For a token carrying UID v, a process waits 2 v rounds, before it forwards it. Complexity:  Messages: Exactly n distinct messages. Total messages less than 2n.  Time: n. 2^(u min )

22 Leader Election: General Synchronous Networks Flooding: max  Each process maintains the max UID it has seen so far max  At each round, each process propagates this max along all its edges. diammax  After diam rounds, if this max is still the UID of the process, the process declares itself leader; else it is a non- leader. max  No. of messages is reduced, if a process broadcasts its max only when it changes.

23 Sruti Gan Chaudhury Geometric Leader Election for Swarm Robots Slides by: Sruti Gan Chaudhury

24 Outline What is Geometric Leader Election? The Robot Model Background of the work - Geometric Problems of swarm Robots. - Why Leader Election? Previous Work Our Approach Reference

25 Geometric Leader Election for Swarm Robots Swarm robots - multiple low cost autonomous mobile robots cooperatively performing tasks. Given a set of such swarm robots scattered on the plane, what are the (minimal) geometric conditions for them to be able to deterministically agree on a single robot as leader?

26 Robots Model Dimensionless or point (or unit disc) Autonomous Homogeneous Oblivious Distributed coordinate system No communication Moves on 2D plane Execute Look-compute-move cycle (asynchronously) x x x x x x y y y y y y

27 Look-Compute-Move Look RvRv  Visibility radius/range (R v ) may be infinite  Takes snapshot

28 Look-Compute-Move Compute  Computes destination: P P

29 Look-Compute-Move Move  Moves to P in straight line.  SYM model: - Instantaneous. - when the robot is moving other robots can not see it.  CORDA model: - not Instantaneous. - when the robot is moving other robots can see it. P

30 Geometric Problems of Swarms Gathering: - gathering multiple autonomous mobile robots into a point or a small region - The choice of the point is not known in advance Arbitrary Pattern Formation: - forming different geometric patterns such as straight line, circle, polygon etc. by the robot swarms. Leader Election : - electing a unique robot among a set of robots. - Leader election is needed for Gathering and Pattern Formation.

31 Why Leader Election ? Compute a destination point C (invariant) C Select one (nearest to C) robot and move it to C Tie occurs if multiple robots are equidistant from C Leader Election is required to break this tie

32 Given the positions of n swarm robots in the plane, the n robots are able to deterministically agree on the same position L called the leader. Yoann Dieudonn´e and Franck Petit worked on “Deterministic Leader Election in Anonymous Sensor Networks Without Common Coordinated System”. Previous Work

33 Sense of Direction and Chirality The robots agree on a common direction of one axis (x or y) and its orientation. The sense of direction is said to be partial if the agreement relates to the direction only - i.e., they are not required to agree on the orientation. The robots have chirality if they share the same handedness.

34 Sense of Direction and Chirality (a)Sense of Direction and Chirality (b) Sense of Direction and No Chirality (c) No Sense of Direction and Chirality (d) No Sense of Direction and No Chirality x y y y y y y y y y y y y x x x x x x x x x

35 Lyndon word A word w (|w|>0) is a Lyndon word if and only if w is nonempty, primitive and strictly minimal, i.e., w !=   and for all j in{ 2,..., |w|}, w < R j (w). Let u and v be the words. k is an integer. A word u is said to be primitive if and only if u = v k where k = 1 A word u is said to be strictly periodic if and only if u = v k where k > 1 The j th rotation of a word w is defined by : R j (w) =  if w =  a j,…,a 1,…,a j-1 otherwise (w = a 1,…,a l l > 1) A word w is said to be minimal if and only if for all j in {1,..., l}, w < R j (w)

36 Leader Election with Chirality O a b c c c c c c d e r A word W(r) is associated with a robot R at r distance apart from the center of SEC (O), such that, W(R) = (abc, β) (c 2,γ) 2 (c,γ)(d,β)(e,α). Theorem 1. Leader election is possible if and only if there exists a robot R such that W(R) is a Lyndon Word. Proof : If W(R) is a Lyndon Word then R is unique. The leader is the robot on the radius which is the nearest from the center of SEC. R SEC      

37 Leader Election with Chirality If there exists no robot R such that W(R) is a Lyndon Word, then for each R, W(R) is strictly periodic. For each robot there exists at least another robot which has the same view of the world. x x x x x x a b ab d d   

38 Leader Election without Chirality d d d d    x x xx Theorem 2: Without chirality, leader election is possible if and only if n (number of robots ) is odd and there exists r such that W(r) is a Lyndon Word. Without chirality, if the number of robots is even, leader election may not be possible. Ex: Ref. to the figure, For any orientation, there exists one Lyndon Word = (d,  )(d,  )(d,  )(d,  ). The symmetry of the configuration does not allow to choose any sensor as a Leader.

39 Our Approach Leader election is not sufficient for Gathering and Arbitrary pattern formation. Ex: Leader election is possible but gathering is not possible. C Leader STUCK

40 Our Approach Given a set of robots on the 2D plane, we order the robots with respect to the destination. Ordering is invariant. The first robot in the ordering is leader C 1 2 3 4 5 6 Leader

41 Our Results and Discussions Ordering is possible if and only if robots are in asymmetric configuration. C C Ordering Possible Ordering not Possible Line of symmetry

42 References [1] Nancy A. Lynch, Distributed Algorithms. [2] Yoann Dieudonn´e and Franck Petit worked on “Deterministic Leader Election in Anonymous Sensor Networks Without Common Coordinated System”, INRIA Lab, 2009. [3] S. Gan Chaudhuri, K. Mukhopadhaya, Gathering Asynchronous Transparent Fat Robots, ICDCIT 2010.


Download ppt "Distributed Leader Election Krishnendu Mukhopadhyaya Indian Statistical Institute, Kolkata."

Similar presentations


Ads by Google