Lecture #14 Distributed Algorithms (II) CS492 Special Topics in Computer Science: Distributed Algorithms and 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.
Leader Election Breaking the symmetry in a system.
Distributed Leader Election Algorithms in Synchronous Ring Networks
Introduction to Computer Networks Spanning Tree 1.
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.
Multiprocessor Synchronization Algorithms ( ) Lecturer: Danny Hendler The Mutual Exclusion problem.
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.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 7 Instructor: Haifeng YU.
Università degli Studi dell’Aquila Academic Year 2009/2010 Course: Algorithms for Distributed Systems Instructor: Prof. Guido Proietti Time: Monday:
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
1 Distributed Computing Algorithms CSCI Distributed Computing: everything not centralized many processors.
CPSC 668Set 4: Asynchronous Lower Bound for LE in Rings1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – basic techniques Ernesto Damiani University of Bozen Lesson 1 – Introduction.
Asynchronous Consensus (Some Slides borrowed from ppt on Web.(by Ken Birman) )
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.
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
CS1001 Lecture 23. Overview Incompleteness and the Halting Problem Incompleteness and the Halting Problem Methods in Artificial Intelligence Methods in.
Bit Complexity of Breaking and Achieving Symmetry in Chains and Rings.
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 2 – Distributed Systems.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 19: Paxos All slides © IG.
Efficient Algorithms to Implement Failure Detectors and Solve Consensus in Distributed Systems Mikel Larrea Departamento de Arquitectura y Tecnología de.
Distributed Computing 5. Synchronization Shmuel Zaks ©
Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.
6.852: Distributed Algorithms Spring, 2008 Instructors: Nancy Lynch, Victor Luchangco Teaching Assistant: Calvin Newport Course Secretary: Joanne Hanley.
Lecture 8-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2010 Indranil Gupta (Indy) September 16, 2010 Lecture 8 The Consensus.
Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 10 Instructor: Haifeng YU.
Consensus and Its Impossibility in Asynchronous Systems.
Distributed Computing 3. Leader Election – lower bound for ring networks Shmuel Zaks ©
Review for Exam 2. Topics included Deadlock detection Resource and communication deadlock Graph algorithms: Routing, spanning tree, MST, leader election.
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.
Teacher: Chun-Yuan Lin
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.
Minimum Spanning Tree. Given a weighted graph G = (V, E), generate a spanning tree T = (V, E’) such that the sum of the weights of all the edges is minimum.
Multiprocess Synchronization Algorithms ( ) Lecturer: Danny Hendler Global Computation.
Leader Election (if we ignore the failure detection part)
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
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Minimum Spanning Tree Given a weighted graph G = (V, E), generate a spanning tree T = (V, E’) such that the sum of the weights of all the edges is minimum.
Distributed Algorithms (22903) Lecturer: Danny Hendler Leader election in rings This presentation is based on the book “Distributed Computing” by Hagit.
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.
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 ::
Khaled M. Alzoubi, Peng-Jun Wan, Ophir Frieder
Chapter 11 Coordination Election Algorithms
Lecture 9: Asynchronous Network Algorithms
Leader Election (if we ignore the failure detection part)
Distributed Consensus
Parallel and Distributed Algorithms
Leader Election CS60002: Distributed Systems
CS 425 / ECE 428 Distributed Systems Fall 2017 Indranil Gupta (Indy)
Distributed Computing:
Lecture 8: Synchronous Network Algorithms
Leader Election Ch. 3, 4.1, 15.1, 15.2 Chien-Liang Fok 4/29/2019
Presentation transcript:

Lecture #14 Distributed Algorithms (II) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems

Admin Stuff Cloud computing article Lynch’s book chapters 2

Topics to Cover Synchronous Network Model (Ch. 2-4) – Leader election in a synchronous ring – Breadth-first search – Shortest paths – Min spanning tree – Maximal independent set Asynchronous System Model (Ch. 8-9) – Asynchronous shared memory model 3

Leader Election in a Synchronous Ring Electing a unique leader – In a ring, exactly one process should output the decision that it is the leader.

LCR algorithm (informal) Le Lann, Chang, and Roberts Each process sends its identifier around the ring. When a process receives an incoming identifier, it compares that identifier to its own. If the incoming identifier is greater than its own, it keeps passing the identifier; if it is less than its own, it discards the incoming identifier; if it is equal to its own, the process declares itself the leader. 5

LCR algorithm (formal) For each i, states i consist of: u: initially i‘s UID send: a UID or null, initially i‘s UID status: with values in {unknown, leader}, initially unknown For each i, msgs i defined by: send the current value of send to process i+1 6

LCR algorithm (formal) For each i, trans i defined by: u: initially i‘s UID send: = null if the incoming message is v, a UID, then case v > u : send: = v v = u : status := leader v < u : do nothing endcase 7

How to prove its correctness? Process i max outputs leader by the end of round n No other process ever performs such an output 8

Lemma 3.2 Process i max outputs leader by the end of round n Assertion After n rounds, status(i max ) = leader Assertion For 0 <= r <= n-1, after r rounds, send(i max +r) = u max 9

Lemma 3.3 No process other than i max ever outputs the value leader. Assertion For any r and any i, j, the following holds. After r rounds, if i ≠ i max and j \in [i max, i) then send j ≠ u i 10

Theorem 3.4 LCR solves the leader-election problem 11

Questions How can other processes halt? What is the complexity? – Time – Communication 12

An algorithm w/ O(n log n) complexity Assumptions: – Ring size unknown – Bidirection communication 13

HS Algorithm (informal) Each process i operates in phases 0,1,2,…. In each phase l, process i sends out “tokens” containing its UID u i in both directions. These are intended to travel distance 2l, then return to their origin i. If both tokens make it back safely, process i continues with the following phase. However, the tokens might not make it back safely. While a u i token is proceeding in the outbound direction, each other process j on u i ’s path compares u i with its own UID u j. If u i u j, then j relays u i. If u i = u j, then it means that process j has received its own UID before the token has turned around, so process j elects itself as the leader. 14

Non-Comparison-Based Algortihms Question: is it possible to elect a leader with fewer than O(n log n) messages? The TimeSlice algorithm – ring size n is known The VariableSpeeds algorithm – Each process i sends a msg at every 2v rounds.