Distributed Leader Election Krishnendu Mukhopadhyaya Indian Statistical Institute, Kolkata.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

Chapter 13 Leader Election. Breaking the symmetry in system Similar to distributed mutual exclusion problems, the first process to enter the CS can be.
Leader Election Breaking the symmetry in a system.
Distributed Leader Election Algorithms in Synchronous Ring Networks
Impossibility of Distributed Consensus with One Faulty Process
N-Consensus is the Second Strongest Object for N+1 Processes Eli Gafni UCLA Petr Kuznetsov Max Planck Institute for Software Systems.
Lecture 8: Asynchronous Network Algorithms
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Chapter 15 Basic Asynchronous Network Algorithms
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty.
Distributed Computing 2. Leader Election – ring network Shmuel Zaks ©
Lecture 7: Synchronous Network Algorithms
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Self Stabilization 1.
Stéphane Devismes VERIMAG UMR 5104 Univ. Joseph Fourier Grenoble, France Optimal Exploration of Small Rings Talk by Franck Petit, Univ. Pierre et Marie.
A Randomized Gathering Algorithm for Multiple Robots with Limited Sensing Capabilities Noam Gordon Israel A. Wagner Alfred M. Bruckstein Technion – Israel.
CPSC 668Set 5: Synchronous LE in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
1 Complexity of Network Synchronization Raeda Naamnieh.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Self Stabilization1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
Bit Complexity of Breaking and Achieving Symmetry in Chains and Rings.
Leader Election in Rings
Efficient Algorithms to Implement Failure Detectors and Solve Consensus in Distributed Systems Mikel Larrea Departamento de Arquitectura y Tecnología de.
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
Discrete Bee Dance Algorithms for Pattern Formation on the Grid Noam Gordon Israel A. Wagner Alfred M. Bruckstein Technion IIT, Israel.
Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.
Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.
Selected topics in distributed computing Shmuel Zaks
6.852: Distributed Algorithms Spring, 2008 Instructors: Nancy Lynch, Victor Luchangco Teaching Assistant: Calvin Newport Course Secretary: Joanne Hanley.
Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 10 Instructor: Haifeng YU.
Franck Petit INRIA, LIP Lab. Univ. / ENS of Lyon France Optimal Probabilistic Ring Exploration by Semi-Synchronous Oblivious Robots Joint work with Stéphane.
Consensus and Its Impossibility in Asynchronous Systems.
Observe and Remain Silent Communication-less agent location discovery MFCS 2012 Speaker: Thomas Gorry (University of Liverpool) Co-authors: Tom Friedetzky.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
The Complexity of Distributed Algorithms. Common measures Space complexity How much space is needed per process to run an algorithm? (measured in terms.
1 Leader Election in Rings. 2 A Ring Network Sense of direction left right.
Leader Election. Leader Election: the idea We study Leader Election in rings.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 5: Synchronous LE in Rings 1.
Lecture #14 Distributed Algorithms (II) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
Sliding window protocol The sender continues the send action without receiving the acknowledgements of at most w messages (w > 0), w is called the window.
Leader Election (if we ignore the failure detection part)
Impossibility of Distributed Consensus with One Faulty Process By, Michael J.Fischer Nancy A. Lynch Michael S.Paterson.
1 Review Questions Define n variables, types of shared variables, message-passing, shared-memory system, system topology n program-counter/guarded command.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
1 Fault tolerance in distributed systems n Motivation n robust and stabilizing algorithms n failure models n robust algorithms u decision problems u impossibility.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty ::
CSE 486/586 Distributed Systems Leader Election
Leader Election Chapter 3 Observations Election in the Ring
Paper by David peleg Presentation by Vanessa surjadidjaja
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Algorithms for COOPERATIVE DS: Leader Election in the MPS model
Lecture 9: Asynchronous Network Algorithms
Leader Election (if we ignore the failure detection part)
Turnstile Streaming Algorithms Might as Well Be Linear Sketches
Alternating Bit Protocol
Distributed Consensus
Agreement Protocols CS60002: Distributed Systems
Parallel and Distributed Algorithms
Distributed Consensus
Fault-tolerant Consensus in Directed Networks Lewis Tseng Boston College Oct. 13, 2017 (joint work with Nitin H. Vaidya)
Leader Election CS60002: Distributed Systems
CSE 486/586 Distributed Systems Leader Election
Lecture 8: Synchronous Network Algorithms
Leader Election Ch. 3, 4.1, 15.1, 15.2 Chien-Liang Fok 4/29/2019
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

Distributed Leader Election Krishnendu Mukhopadhyaya Indian Statistical Institute, Kolkata

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

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

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

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.

Leader Election: Synchronous Ring n-1 n-2 4 5

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

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.

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.

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

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

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

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

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

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.

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

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

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

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)

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

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 )

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.

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

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

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?

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

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

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

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

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.

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

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

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.

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

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)

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      

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   

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.

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

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 Leader

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

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, [3] S. Gan Chaudhuri, K. Mukhopadhaya, Gathering Asynchronous Transparent Fat Robots, ICDCIT 2010.