Leader Election Bismita Srichandan. Leader Election What is Leader Election Why Leader election is needed Different design topologies Algorithms used.

Slides:



Advertisements
Similar presentations
CS 542: Topics in Distributed Systems Diganta Goswami.
Advertisements

CS3771 Today: deadlock detection and election algorithms  Previous class Event ordering in distributed systems Various approaches for Mutual Exclusion.
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.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
JADE: The Bully Algorithm. Problem Context of distributed computing Problem of leader election: leader election is the process of designating a single.
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.
Page 1 Mutual Exclusion* Distributed Systems *referred to slides by Prof. Paul Krzyzanowski at Rutgers University and Prof. Mary Ellen Weisskopf at University.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
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
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.
Chapter 18: Distributed Coordination (Chapter 18.1 – 18.5)
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1 ICS 214B: Transaction Processing and Distributed Data Management Distributed Database Systems.
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.
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.
4.5 DISTRIBUTED MUTUAL EXCLUSION MOSES RENTAPALLI.
4.5 Distributed Mutual Exclusion Ranjitha Shivarudraiah.
Lecture 5: Sun: 1/5/ Distributed Algorithms - Distributed Databases Lecturer/ Kawther Abas CS- 492 : Distributed system &
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
L EADER E LECTION Yu Meng O UTLINE Basic knowledge Overview of Leader Election Complete Topology Logical Ring Topology Three Topology Latest.
Coordination and Agreement. Topics Distributed Mutual Exclusion Leader Election.
Page 1 Distributed Systems Election Algorithms* *referred to slides by Prof. Hugh C. Lauer at Worcester Polytechnic Institute.
CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 8 Leader Election Section 12.3 Klara Nahrstedt.
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
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.
ADITH KRISHNA SRINIVASAN
Distributed Systems CS Synchronization – Part III Lecture 10, Sep 30, 2013 Mohammad Hammoud.
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.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
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.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
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.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
CSC 8420 Advanced Operating Systems Georgia State University Yi Pan Transactions are communications with ACID property: Atomicity: all or nothing Consistency:
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
Lecture 11: Coordination and Agreement Central server for mutual exclusion Election – getting a number of processes to agree which is “in charge” CDK4:
CSE 486/586 Distributed Systems Leader Election
Distributed Processing Election Algorithm
Chapter 6.3 Mutual Exclusion
Distributed Mutual Exclusion
CSE 486/586 Distributed Systems Leader Election
Lecture 10: Coordination and Agreement
Prof. Leonardo Mostarda University of Camerino
Lecture 11: Coordination and Agreement
Leader Election Bernard Chen.
Distributed Systems and Concurrency: Synchronization in Distributed Systems Majeed Kassis.
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

Leader Election Bismita Srichandan

Leader Election What is Leader Election Why Leader election is needed Different design topologies Algorithms used – Bully Algorithm – Ring Algorithm – Invitation Algorithm References

What is Leader Election? In distributed computing, leader election is the process of designating a single process as the organizer, coordinator, initiator or sequencer of some task distributed among several computers (nodes).

Why Leader Election is required The existence of a centralized controller greatly simplifies process synchronization However, if the central controller breaks down, the service availability can be limited The problem can be alleviated if a new controller (leader) can be chosen How leader is chosen? Ans: Different Algorithms are used for leader election.

Leader Election criteria(Chow et al, 1997) 1: Extrema finding - Leader election is based on global priority. 2: Preference-based - Processes in the group can vote for leader based on personal preference (locality, reliability, estimation).

Leader Election Algorithms for Wireless Ad Hoc Networks[10] Two algorithms, Secure Extrema Finding Algorithm (SEFA) and Secure Preference-based Leader Election Algorithm (SPLEA). SEFA assumes that all elector-nodes share a single common evaluation function that returns the same value. In SPLEA, the scenario becomes more complicated because elector-nodes can have different preferences for a candidate- node.

Leader Election Algorithms for Wireless Ad Hoc Networks One relaxed assumption in synchronous distributed systems, Asynchronous Extrema Finding Algorithm (AEFA) is used. In this we allow the topology to change during the election process. In AEFA, nodes can start the process of election at different times, but after topological changes stop long enough for the algorithm to terminate, all nodes agree on a unique leader.

Election vs. Synchronization Election In election, all participants must know who owns the token(i.e. who is the leader). Election algorithms are performed only if failure occurs. Synchronization In synchronization, the nontoken holders only need to know that they do not hold the token. Synchronization algorithms are designed to work well in absence of failures.

Leader Election vs. Mutual Exclusion Leader Election Process may yield to others and execute normally as long as leader is selected. Concerned with fast and successful termination of election process. Result of leader election must be known to other processes. Mutual Exclusion Process competes until it succeeds. Must ensure that no process is starved. Does not care which process is running in critical section.

Design Topologies Complete Topology Logical Ring Topology Tree Topology Complete Topology: Each process in the group can reach any other process in the same group in one message hop. Assumptions taken – All process ids are unique and known to every process – Second assumption is communication network is reliable and only the communicating processes may fail. – Process takes a known finite amount of time to handle a message, in other words, the process is considered as crashed if it doesn’t respond within specified time-out period. *Note – Bully algorithm is based on the assumptions of complete topology

Bully Algorithm(Author : Tanenbaum) This is an extrema-finding algorithm. In this algorithm, the highest-numbered process becomes coordinator. Thus the biggest guy in town always wins, hence the name “Bully Algorithm.” When a process notices that the coordinator is not responding to requests, it initiates an election. Bully algorithm makes note of time of by which the process should respond. Election is held as follows: – P sends an ELECTION message to all processes with higher numbers. – If no one responds, P wins the election and becomes coordinator. – If one of the higher-ups answers, it takes over. P’s job over!

Bully Algorithm 1.Process 4 holds an election. 2.Process 5 and 6 respond, sending OK message that, we are UP. 3.Now 5 and 6 each hold an election.

Bully Algorithm Process 6 tells 5 to stop Process 6 wins and tells everyone Process 6 tells 5 to stop Process 6 wins and tells everyone. 13

Logical Ring Topology Easy to construct Unique property is that a message initiated by any node will return to the node.

Ring Algorithm In Ring algorithm if any process notices that the current coordinator has failed, it starts an election by sending message to the first neighbor on the ring. The election message contains the node’s process identifier and is forwarded on around the ring. Each process adds its own identifier to the message. When the election message reaches the originator, the election is complete. Coordinator is chosen based on the highest numbered process.

Ring Algorithm Initiation: 1. Process 4 sends an ELECTION message to its successor (or next alive process) with its ID 2. Each process adds its own ID and forwards the ELECTION message

Ring Algorithm contd… Leader Election: 1. Message comes back to initiator, here the initiator is Initiator announces the winner by sending another message around the ring

Tree Topology To construct a logical ring structure is easy if the underlying network supports broadcast facilities. A tree is used as representative topological structure. Each node is considered an autonomous entity that exchanges messages with adjacent nodes A minimum-weight spanning tree(MST) is used for leader election in tree topology Gallager, Humbelt, and Spira’s algorithm is based on searching and combining. It works by merging fragments, starting from each node and attaching level by level till it ends up with the MST A leader can be designated as the last node that merges and yields to the final MST.

Invitation Algorithm Invitation algorithm is a strong algorithm and it is basically designed for asynchronous systems. It eliminates possible drawbacks of Bully algorithm. Few drawbacks of Bully Algorithm – Bully algorithm strongly uses the facts that timeouts can accurately detect failed processors. – An arbitrary timing glitch (lost messages, overfull buffers, temporary overloads etc), the bully algorithm can elect two leaders. – Another possibility can be the node that fails to respond might not have failed.

Invitation Algorithm contd… Each node in a group periodically checks whether the leader is alive or not, by sending a message to the leader and waits for reply. If the node does not reply within a timeout period, the node invokes a Recovery procedure. The recovery procedure puts node i into a singleton group with node i as the leader. periodically, each leader i calls a check procedure, which sends messages to every other node asking whether that node is a leader. If many nodes responds that it is a leader, node i pauses for some time and then calls for a merge procedure.

Invitation Algorithm contd… Merge procedure sends message to all the leaders, inviting them to join a new group with the inviting node as leader. Example :Group communication system in Amoeba uses Invitation Algorithm to reconfigure a group after a node crashes[8].

References [1] Distributed Operating Systems & Algorithms, Randy Chow and Theodore Johnson, Addison Wesley, [2] [3] [4] [5] H. Garcia-Molina. Elections in a distributed computing system. IEEE Transactions on Computers, C- 31(1):47-59, January [6] [7] Distributed Systems principles and paradigms by Andrew S. Tanenbaum, Maarten van Steen, [8] M.F. Kaashoek and A.S. Tanenbaum, “Group Communication in the Amoeba Distributed Operating System,” Proc. IEEE 11th Int'l Conf. Distributed Computing Systems (ICDCS), pp , [8] M.F. Kaashoek and A.S. Tanenbaum, “Group Communication in the Amoeba Distributed Operating System,” Proc. IEEE 11th Int'l Conf. Distributed Computing Systems (ICDCS), pp , 1991.

References Ring Algorithm [9] [10]Vasudevan, S.; DeCleene, B.; Immerman, N.; Kurose, J.; Towsley, D.; “Leader election algorithms for wireless ad hoc networks”, DARPA Information Survivability Conference and Exposition, ProceedingsDARPA Information Survivability Conference and Exposition, Proceedings [11] Optimal Leader Election Scheme for Peer-to-Peer Applications Networking, ICN '07. Sixth International Conference on Volume, Issue, April

Thank You! Questions