Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.

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 Breaking the symmetry in a system.
Distributed Leader Election Algorithms in Synchronous Ring Networks
Impossibility of Distributed Consensus with One Faulty Process
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 ©
Lecture 7: Synchronous Network Algorithms
JADE: The Bully Algorithm. Problem Context of distributed computing Problem of leader election: leader election is the process of designating a single.
Università degli Studi dell’Aquila Academic Year 2009/2010 Course: Algorithms for Distributed Systems Instructor: Prof. Guido Proietti Time: Monday:
1 Complexity of Network Synchronization Raeda Naamnieh.
CS 582 / CMPE 481 Distributed Systems
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Performance Comparison of Existing Leader Election Algorithms for Dynamic Networks Mobile Ad Hoc (Dynamic) Networks: Collection of potentially mobile computing.
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
Election Algorithms and Distributed Processing Section 6.5.
Election Algorithms. Topics r Issues r Detecting Failures r Bully algorithm r Ring algorithm.
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
Lecture 6: Introduction to Distributed Computing.
Distributed Algorithms 2014 Igor Zarivach A Distributed Algorithm for Minimum Weight Spanning Trees By Gallager, Humblet,Spira (GHS)
Distributed Computing 5. Synchronization Shmuel Zaks ©
Introduction Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
Leader Election Algorithms for Mobile Ad Hoc Networks Presented by: Joseph Gunawan.
Why do we need models? There are many dimensions of variability in distributed systems. Examples: interprocess communication mechanisms, failure classes,
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 01, 2005 Session 14.
Consensus and Its Impossibility in Asynchronous Systems.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 1: Introduction 1.
1 Lectures on Parallel and Distributed Algorithms COMP 523: Advanced Algorithmic Techniques Lecturer: Dariusz Kowalski Lectures on Parallel and Distributed.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 January Session 4.
04/06/2016Applied Algorithmics - week101 Dynamic vs. Static Networks  Ideally, we would like distributed algorithms to be: dynamic, i.e., be able to.
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.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15.
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.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion & Leader Election Steve Ko Computer Sciences and Engineering University.
Hwajung Lee.  Models are simple abstractions that help understand the variability -- abstractions that preserve the essential features, but hide the.
Leader Election (if we ignore the failure detection part)
Several sets of slides by Prof. Jennifer Welch will be used in this course. The slides are mostly identical to her slides, with some minor changes. Set.
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 2: Basic Graph Algorithms 1.
Hwajung Lee.  Models are simple abstractions that help understand the variability -- abstractions that preserve the essential features, but hide the.
Impossibility of Distributed Consensus with One Faulty Process By, Michael J.Fischer Nancy A. Lynch Michael S.Paterson.
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.
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
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
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 ::
Coordination and Agreement
CSE 486/586 Distributed Systems Leader Election
Distributed Processing Election Algorithm
Lecture 9: Asynchronous Network Algorithms
Leader Election (if we ignore the failure detection part)
Parallel and Distributed Algorithms
Introduction to locality sensitive approach to distributed systems
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
CSE 486/586 Distributed Systems Leader Election
Lecture 8: Synchronous Network Algorithms
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Leader Election Ch. 3, 4.1, 15.1, 15.2 Chien-Liang Fok 4/29/2019
CSE 486/586 Distributed Systems Leader Election
ITEC452 Distributed Computing Lecture 3 Models in Distributed Systems
Presentation transcript:

Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9

Computer Science and Engineering Contents Message Passing Model Complexity Analysis Summation Leader Election

Computer Science and Engineering Introduction  Recent migrations to distributed systems have increased he need for a better understanding of message passing computational model and algorithms  A processing unit in such systems is an autonomous computer, which may be engaged in its own private computation while at the same time cooperating with other units in the context of some computational task.

Computer Science and Engineering Message Passing Computing Models  Algorithm – collection of local programs running concurrently on different processing units. Each program performs a sequence of computation and message passing operations  Message passing can be represented using a communication graph  Processor vs. Process

Computer Science and Engineering Degree of Synchrony Synchronous – Computation and communication are dome in a lockstep manner. (rounds of send, receive, compute) Asynchronous – processing units take steps at arbitrary speeds and communication delay is unpredictable Partially synchronous – restrictions on the relative timing events

Computer Science and Engineering Synchronous Model  n processors & communication graph G(V,E)  Modeled as a state machine  System is initialized and set to an arbitrary initial state  For each process i in V repeat in synchronized rounds  Send messages to outgoing neighbors by applying some message generation function to current state  Obtain the new state by applying a state transition function to the current state and the received messages

Computer Science and Engineering Asynchronous Model n processors & communication graph G(V,E) Communication does not happen in synchronized rounds Messages incur an unbounded and unpredictable delay I/O automata (simple type of state machine in which transitions are associated with actions) is used to model asynchronous systems

Computer Science and Engineering Synchronous model as a state machine  M, a fixed message alphabet  A process i can be modeled as  Qi, a (possibly infinite) set of states. The system state can be represented using a set of variables.  q0,i, the initial state in the state set Qi. The state variables have initial values in the initial state.  GenMsgi, a message generation function. It is applied to the current system state to generate messages to the outgoing neighbors from elements in M.  Transi, a state transition function that maps the current state and the incoming messages into a new state.

Computer Science and Engineering Algorithm Template Algorithm S_Template Q i q 0,i ← GenMsg i Trans i

Computer Science and Engineering Complexity Analysis  Message Complexity Number of messages sent between neighbors during the execution of the algorithm in the worst case  Time Complexity Synchronous – Number of rounds

Computer Science and Engineering Summation on a hypercube Algorithm S_Sum_Hypercube Q i buff, an integer dim, a value in {1, 2,..., log n} q 0,i buff ← xi dim ← log n GenMsg i If the current value of dim = 0, do nothing. Otherwise, send the current value of buff to the neighbor along the dimension dim. Trans i if the incoming message is v & dim > 0, then buff ← buff + v, dim ← dim - 1

Computer Science and Engineering Group Work Work the following example with your neighbor

Computer Science and Engineering Leader Election Problem  A leader among n processors is the one that is recognized by all other processors as distinguished to perform a special task  The problem occur when the processors must choose one of them as a leader.  Each processor should eventually decide whether or not it is a leader (each processor is only aware of its identification)  Most important when coordination among processors becomes necessary to recover from a failure or topological change.

Computer Science and Engineering A solution  Given a communication graph G = (V,E)  Two steps  Each node in the graph would broadcast its unique identifier to all other nodes  After receiving the identifier of all nodes, the node with the highest identifier declares itself as the leader  Complexity  Time  Message

Computer Science and Engineering Leader election in synchronous rings  By Chang and Roberts  Assumptions  Communication is unidirectional (clockwise)  The size of the ring is not known  The ID of each node is unique

Computer Science and Engineering Leader election in synchronous rings Algorithm 1. Each process sends its ID to its outgoing neighbor 2. When a process receives an ID from an incoming neighbor, then: The process sends null to its outgoing neighbor, if the received ID is less than its own ID The process sends the received ID to its outgoing neighbor, if the received ID is greater than its own ID The process declares itself as a leader, if the received identifier is equal to its own identifier

Computer Science and Engineering Complexity Analysis Given n processors connected via a ring Time Complexity – O(n) Message Complexity – O(n 2 ) Why?

Computer Science and Engineering Group Work 1- Work the following example with your neighbor 2- Study the improved leader election algorithm