ADITH KRISHNA SRINIVASAN

Slides:



Advertisements
Similar presentations
Leader Election Breaking the symmetry in a system.
Advertisements

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.
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
1 CS 194: Elections, Exclusion and Transactions Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer.
6.852: Distributed Algorithms Spring, 2008 Class 7.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
1 Algorithms and protocols for distributed systems We have defined process groups as having peer or hierarchical structure and have seen that a coordinator.
Lecture 4: Elections, Reset Anish Arora CSE 763 Notes include material from Dr. Jeff Brumfield.
Leader Election Bismita Srichandan. Leader Election What is Leader Election Why Leader election is needed Different design topologies Algorithms used.
Distributed Systems Spring 2009
LEADER ELECTION CS Election Algorithms Many distributed algorithms need one process to act as coordinator – Doesn’t matter which process does the.
CS 582 / CMPE 481 Distributed Systems
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
1. Explain why synchronization is so important in distributed systems by giving an appropriate example When each machine has its own clock, an event that.
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Election Algorithms and Distributed Processing Section 6.5.
Election Algorithms. Topics r Issues r Detecting Failures r Bully algorithm r Ring algorithm.
L EADER E LECTION Advanced Operating Systems (CSC 8320) Fall 2011 Shagun Kariwala.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Vinay Kumar Madhadi 09/23/2009 CSC Outline  Part 1 : Leader Election?  Part 2 : Different Design Topologies Algorithms Used-Bully, Ring, Invitation.
DISTRIBUTED ALGORITHMS Luc Onana Seif Haridi. DISTRIBUTED SYSTEMS Collection of autonomous computers, processes, or processors (nodes) interconnected.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
Mutual exclusion Concurrent access of processes to a shared resource or data is executed in mutually exclusive manner Distributed mutual exclusion can.
Leader Election Algorithms for Mobile Ad Hoc Networks Presented by: Joseph Gunawan.
Centralized mutual exclusion Problem : What if the coordinator fails? Solution : Elect a new one.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
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.
Elections in a Distributed Computing System Hector Garcia-Molina Presenter: Srinath Rao.
Global State (1) a)A consistent cut b)An inconsistent cut.
Synchronization CSCI 4780/6780. Mutual Exclusion Concurrency and collaboration are fundamental to distributed systems Simultaneous access to resources.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
Vector Clock Each process maintains an array of clocks –vc.j.k denotes the knowledge that j has about the clock of k –vc.j.j, thus, denotes the clock of.
Agenda Fail Stop Processors –Problem Definition –Implementation with reliable stable storage –Implementation without reliable stable storage Failure Detection.
Synchronization Chapter 5.
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.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Mutual Exclusion & Leader Election Steve Ko Computer Sciences and Engineering University.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
6.5 Election Algorithms -Avinash Madineni.
Election Distributed Systems. Algorithms to Find Global States Why? To check a particular property exist or not in distributed system –(Distributed) garbage.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
Relying on Safe Distance to Achieve Strong Partitionable Group Membership in Ad Hoc Networks Authors: Q. Huang, C. Julien, G. Roman Presented By: Jeff.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Distributed Mutual Exclusion Synchronization in Distributed Systems Synchronization in distributed systems are often more difficult compared to synchronization.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
Distributed Systems 14. Coordination in Distributed Systems Simon Razniewski Faculty of Computer Science Free University of Bozen-Bolzano A.Y. 2014/2015.
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
CIS 825 Lecture 8. Leader Election Aim is to elect exactly one node as the leader.
Lecture 11: Coordination and Agreement Central server for mutual exclusion Election – getting a number of processes to agree which is “in charge” CDK4:
Distributed Systems 31. Theoretical Foundations of Distributed Systems - Coordination Simon Razniewski Faculty of Computer Science Free University of Bozen-Bolzano.
CSE 486/586 Distributed Systems Leader Election
Simon Razniewski Faculty of Computer Science
Chapter 11 Coordination Election Algorithms
Distributed Processing Election Algorithm
Distributed Systems, Consensus and Replicated State Machines
CSE 486/586 Distributed Systems Leader Election
Lecture 10: Coordination and Agreement
Chapter 5 (through section 5.4)
Synchronization (2) – Mutual Exclusion
Prof. Leonardo Mostarda University of Camerino
Lecture 11: Coordination and Agreement
Leader Election Bernard Chen.
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

ADITH KRISHNA SRINIVASAN ELECTION ALGORITHMS ADITH KRISHNA SRINIVASAN

ELECTIONS There are at least two basic strategies by which a distributed system can adapt to failures. operate continuously as failures occur and are repaired The second alternative is to temporarily halt normal operation and to take some time out to reorganize the system. The reorganization of the system is managed by a single node called the coordinator. So as a first step in any reorganization, the operating or active nodes must elect a coordinator.

ELECTION AND SYNCHRONIZATION Similar Like Synchronization, all processors must come to an agreement about who enters the critical region (i.e. who is the leader) Different The election protocol must properly deal with the case of a coordinator failing. On the other hand, mutual exclusion algorithms assume that the process in the critical region (i.e., the coordinator) will not fail. A new coordinator must inform all active nodes that it is the coordinator. In a mutual exclusion algorithm, the nodes not in the critical region have no need to know what node is in the region.

ELECTION ALGORITHMS The two classical election algorithms by Garcia-Molina Bully Algorithm Invitation Algorithm Ring Algorithm

The Bully Algorithm Assumptions Each node has access to some permanent storage that survives node failures. There are no transmission errors. The communication subsystem does not fail

The Bully Algorithm State Information For Election Status Co-ordinator Down,Election,Reorganization,Normal Co-ordinator The Current co-ordinator of the node Definition The State Information of the task being performed - the application algorithms, list of the participating nodes

The Bully Algorithm Each process has an associated priority (weight). The process with the highest priority should always be elected as the coordinator. How do we find the heaviest process? Any process can just start an election by sending an election message to all other processes If a process Pheavy receives an election message from a lighter process Plight, it sends a take-over message to Plight. Plight is out of the race. If a process doesn’t get a take-over message back, it wins, and sends a victory message to all other processes.

The Bully Algorithm The bully election algorithm Process 4 holds an election Process 5 and 6 respond, telling 4 to stop Now 5 and 6 each hold an election

Process 6 tells 5 to stop Process 6 wins and tells everyone

Bully Algorithm: Properties Assume n processes initially Worst Case: Smallest process initiates election Requires O(n2) messages Best Case: Eventual leader initiates election Requires (n-1) messages

The Invitation Algorithm Bullying algorithm fails for asynchronous systems The invitation algorithm classifies nodes into ‘groups’ and elects a co-ordinator for every group An additional state variable is indroduced for this asynchronous election Group Number Identifier of the group the processor belongs to

The Invitation Algorithm When Processor p wishes to establish itself as the new co-ordinator , it sends out invitations to the potential participants Groups that can communicate try to coalesce into larger groups Periodically the group co-ordinator searches for other groups

The Invitation Algorithm Starting a new Group If a node does not hear from its co-ordinator for a long time, the node declares its own group It could start sending invitations to all the other participants of the old group

A Comparison of the two Algorithms Logical Structure Bully – Simple and Efficient because it imposes a logical structure on processors Invitation – Might take a long time for groups to merge because of no strongly defined structure

A Comparison of the two Algorithms Synchronous Vs Asynchronous Bully Makes very strong use of bounded response time which are mostly unrealistic Invitation Works correctly in the presence of timing failures

Election in a Ring Process priority is obtained by organizing processes into a (logical) ring. Process with the highest priority should be elected as coordinator. Each process has a successor Initiation: A process sends an ELECTION message to its successor (or next alive process) with its ID Each process adds its own ID and forwards the ELECTION message Leader Election: Message comes back to initiator Initiator announces the winner by sending another message around the ring

Ring Algorithm: Initiation

Ring Algorithm - Election

Ring Algorithm: Properties If only 1 process initiates election: Requires 2n messages Two or more processes might simultaneously initiate elections Still ensures election of the same leader Results in extra messages

REFERENCES Elections in a Distributed Computing System HECTOR GARCIA-MOLINA, Distributed Systems Andrew S.Tenenbaum,Marten van Sten Distributed Operating Systems & Algorithms Randy Chow, Theodore Johnson A Leader Election Algorithm in a Distributed Computing System(1995) Tai Woo Kimo, Eui Hong Kim, Joong Kwon Kim ,Korea Institute of Science and Technology Leader election algorithms for wireless ad hoc networks (2003) Vasudevan, S.   DeCleene, B.   Immerman, N.   Kurose, J.   Towsley, D.   Dept. of Comput. Sci., Massachusetts Univ., Amherst, MA, USA;