Leader Election CS60002: Distributed Systems

Slides:



Advertisements
Similar presentations
Chapter 13 Leader Election. Breaking the symmetry in system Similar to distributed mutual exclusion problems, the first process to enter the CS can be.
Advertisements

Leader Election.
Distributed Algorithms – 2g1513
UBE529 Distributed Coordination. 2 Leader Election Gerard LeLann posed the Election problem in a famous paper 1977 Many distributed systems are client.
Leader Election Breaking the symmetry in a system.
Distributed Leader Election Algorithms in Synchronous Ring Networks
CS 542: Topics in Distributed Systems Diganta Goswami.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
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 ©
Gossip and its application Presented by Anna Kaplun.
Lecture 7: Synchronous Network Algorithms
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 7 Instructor: Haifeng YU.
CPSC 668Set 5: Synchronous LE in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Leader Election in Rings
Distributed Algorithms (22903) Lecturer: Danny Hendler Leader election in rings This presentation is based on the book “Distributed Computing” by Hagit.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 4 – Consensus and reliable.
Election Algorithms and Distributed Processing Section 6.5.
Distributed Computing 5. Synchronization Shmuel Zaks ©
Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
Distributed Computing 3. Leader Election – lower bound for ring networks Shmuel Zaks ©
Page 1 Distributed Systems Election Algorithms* *referred to slides by Prof. Hugh C. Lauer at Worcester Polytechnic Institute.
DC6: Chapter 12 Coordination Election Algorithms Distributed Mutual Exclusion Consensus Group Communication.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
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 11-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2010 Indranil Gupta (Indy) September 28, 2010 Lecture 11 Leader Election.
Lecture #14 Distributed Algorithms (II) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
Leader Election (if we ignore the failure detection part)
1 Review Questions Define n variables, types of shared variables, message-passing, shared-memory system, system topology n program-counter/guarded command.
Hwajung Lee. 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 ::
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Distributed Algorithms (22903) Lecturer: Danny Hendler Leader election in rings This presentation is based on the book “Distributed Computing” by Hagit.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
CIS 825 Lecture 8. Leader Election Aim is to elect exactly one node as the leader.
2016/6/23Election Algorithms1 Introduction to Distributed Algorithm Part Two: Fundamental Algorithm Chapter 7- Election Algorithms Teacher: Chun-Yuan Lin.
1 Algorithms for COOPERATIVE DS: Leader Election in the MPS model.
Distributed Leader Election Krishnendu Mukhopadhyaya Indian Statistical Institute, Kolkata.
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
Chapter 11 Coordination Election Algorithms
Leader Election Chapter 3 Observations Election in the Ring
Distributed Mutual Exclusion
Distributed Processing Election Algorithm
Lecture 17: Leader Election
Distributed Algorithms (22903)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Algorithms for COOPERATIVE DS: Leader Election in the MPS model
CS60002: Distributed Systems
Lecture 9: Asynchronous Network Algorithms
Wave and Traversal Algorithms
Leader Election (if we ignore the failure detection part)
CS60002: Distributed Systems
Agreement Protocols CS60002: Distributed Systems
Parallel and Distributed Algorithms
CSE 486/586 Distributed Systems Leader Election
Lecture 8: Synchronous Network Algorithms
Distributed Algorithms (22903)
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Leader Election Ch. 3, 4.1, 15.1, 15.2 Chien-Liang Fok 4/29/2019
CS60002: Distributed Systems
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

Leader Election CS60002: Distributed Systems INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Leader Election in Rings Models Synchronous or Asynchronous Anonymous (no unique id) or Non-anonymous (unique ids) Uniform (no knowledge of N, the number of processes) or non- uniform (knows N) Known Impossibility Result: There is no synchronous, non-uniform leader election protocol for anonymous rings INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Election in Asynchronous Rings LeLann’s and Chang-Robert’s Algorithms send own id to node on left if an id received from right, forward id to left node only if received id greater than own id, else ignore if own id received, declares itself “leader” Works on unidirectional rings Message complexity = O(n2) INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Hirschberg-Sinclair Algorithm Operates in phases, requires bidirectional ring In the kth phase, send own id to 2k processes on both sides of yourself (directly send only to next processes with id and k in it) If id received, forward if received id greater than own id, else ignore Last process in the chain sends a reply to originator if its id less than received id Replies are always forwarded A process goes to (k+1)th phase only if it receives a reply from both sides in kth phase Process receiving its own id – declare itself “leader”. At most lgn rounds INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Features: Hirschberg-Sinclair Message Complexity: O(n lgn) Lots of other algorithms exist for rings Lower Bound Result: Any comparison-based leader election algorithm in a ring requires Ώ(n lgn) messages INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

The Echo Algorithm – a wave algorithm var recp : integer init 0; // Counts no of recvd mesgs fatherp : process init udef; For the initiator begin forall q  Neighp do send  tok  to q ; while recp < #Neighp do begin receive  tok  ; recp = recp + 1 end ; decide end For non-initiators begin receive  tok  from neighbor q ; fatherp = q ; recp = recp + 1 ; forall q  Neighp, q  fatherp do send  tok  to q ; send  tok  to fatherp INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Extinction on The Echo Algorithm var cawp : process init udef ; // Currently active wave recp : integer init 0; // No of  tok, cawp  received fatherp : process init udef; // Father in wave cawp lrecp : integer init 0; // No of  ldr, .  received winp : process init udef ; // Identity of leader begin if p is initiator then begin cawp = p ; forall q  Neighp do send  tok, p  to q ; end ; while lrecp < #Neighp do begin receive msg from q ; if msg =  ldr, r  then begin if lrecp = 0 then forall q  Neighp do send  ldr, r  to q ; lrecp = lrecp + 1 ; winp = r ; INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Extinction on Echo Algorithm contd.. else // mesg is a  tok, r  message begin if r < cawp then // Reinitialize the algorithm begin cawp = r ; recp = 0 ; fatherp = q ; forall s  Neighp, s  q do send  tok, r  to s end ; if r = cawp then begin recp = recp + 1 ; if recp = #Neighp then if cawp = p then forall s  Neighp do send  ldr, p  to s else send  tok, cawp  to fatherp // If r > cawp then the message is ignored – extinction end if winp = p then statep = leader else statep = lost INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Features If A is a centralized wave algorithm using M messages per wave, the algorithm Ex(A) elects a leader using at most NM messages INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR