Distributed Processing Election Algorithm

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
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.
Multicasting in Mobile Ad Hoc Networks Ravindra Vaishampayan Department of Computer Science University of California Santa Cruz, CA 95064, U.S.A. Advisor:
Lecture 8: Asynchronous Network Algorithms
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.
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.
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.
Leader Election Bismita Srichandan. Leader Election What is Leader Election Why Leader election is needed Different design topologies Algorithms used.
Termination Detection. Goal Study the development of a protocol for termination detection with the help of invariants.
Termination Detection Part 1. Goal Study the development of a protocol for termination detection with the help of invariants.
1 Complexity of Network Synchronization Raeda Naamnieh.
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
Chapter 4 - Self-Stabilizing Algorithms for Model Conservation4-1 Chapter 4: roadmap 4.1 Token Passing: Converting a Central Daemon to read/write 4.2 Data-Link.
Election AlgorithmsCS-4513 D-term Election Algorithms CS-4513 Distributed Computing Systems (Slides include materials from Operating System Concepts,
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
Coordination in Distributed Systems Lecture # 8. Coordination Anecdotes  Decentralized, no coordination  Aloha ~ 18%  Some coordinating Master  Slotted.
Clock Synchronization and algorithm
Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer.
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.
Vinay Kumar Madhadi 09/23/2009 CSC Outline  Part 1 : Leader Election?  Part 2 : Different Design Topologies Algorithms Used-Bully, Ring, Invitation.
Distributed Computing 5. Synchronization Shmuel Zaks ©
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
Election AlgorithmsCS-4513, D-Term Synchronization (continued) CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts, 7 th.
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.
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.
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.
ADITH KRISHNA SRINIVASAN
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.
CLOCK SYNCHRONIZATION SUSMITHA KOTA 21- SEP-2015.
Leader Election (if we ignore the failure detection part)
6.5 Election Algorithms -Avinash Madineni.
A Dynamic Query-tree Energy Balancing Protocol for Sensor Networks H. Yang, F. Ye, and B. Sikdar Department of Electrical, Computer and systems Engineering.
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.
A Bandwidth Scheduling Algorithm Based on Minimum Interference Traffic in Mesh Mode Xu-Yajing, Li-ZhiTao, Zhong-XiuFang and Xu-HuiMin International Conference.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
On Mobile Sink Node for Target Tracking in Wireless Sensor Networks Thanh Hai Trinh and Hee Yong Youn Pervasive Computing and Communications Workshops(PerComW'07)
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.
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
Distributed Systems 31. Theoretical Foundations of Distributed Systems - Coordination Simon Razniewski Faculty of Computer Science Free University of Bozen-Bolzano.
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
Simon Razniewski Faculty of Computer Science
Advanced Topics in Concurrency and Reactive Programming: Time and State Majeed Kassis.
Election algorithm Who wins? God knows.
Lecture 9: Asynchronous Network Algorithms
Leader Election (if we ignore the failure detection part)
EEC 688/788 Secure and Dependable Computing
CSE 486/586 Distributed Systems Leader Election
Lecture 10: Coordination and Agreement
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Lecture 11: Coordination and Agreement
Leader Election Bernard Chen.
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

Distributed Processing Election Algorithm Shubin Wu

Outline Election algorithms – introduction Traditional election algorithms Bully algorithm Ring algorithm Wireless election algorithms

Need for a Coordinator Many algorithms used in distributed systems require a coordinator. In general, all processes in the distributed system are equally suitable for the role. Election algorithms are designed to choose a coordinator.

Assumptions Every process/site has a unique ID; e.g. the network address a process number Every process in the system should know the values in the set of ID numbers, although not which processors are up or down. The process with the highest ID number will be the new coordinator. Process groups (as with ISIS toolkit or MPI) satisfy these requirements.

Requirements When the election algorithm terminates a single process has been selected and every process knows its identity. Formalize: every process pi has a variable ei to hold the coordinator’s process number. ∀i, ei = undefined or ei = P, where P is the non-crashed process with highest id All processes (that have not crashed) eventually set ei = P. Assume All processes know about each other Processes numbered uniquely They do not know each other’s state Suppose P notices no coordinator Sends election message to all higher numbered processes If no response, P takes over as coordinator If any responds, P yields

The Bully Algorithm - Overview Process p calls an election when it notices that the coordinator is no longer responding. High-numbered processes “bully” low-numbered processes out of the election, until only one process remains. When a crashed process reboots, it holds an election. If it is now the highest-numbered live process, it will win. … Suppose Q receives election message Replies OK to sender, saying it will take over Sends a new election message to higher numbered processes Repeat until only one process left standing Announces victory by sending message saying that it is the coordinator

Alternative – Ring Algorithm P thinks the coordinator has crashed; builds an ELECTION message which contains its own ID number. Sends to first live successor Each process adds its own number and forwards to next. OK to have two elections at once.

Elections in Wireless Environments Traditional algorithms aren’t appropriate. Can’t assume reliable message passing or stable network configuration This discussion focuses on ad hoc wireless networks but ignores node mobility. Nodes connect directly, no common access point, connection is short term Often used in multiplayer gaming, on-the-fly file transfers, etc.

Assumptions Wireless algorithms try to find the best node to be coordinator; traditional algorithms are satisfied with any node. Any node (the source) can initiate an election by sending an ELECTION message to its neighbors – nodes within range. When a node receives its first ELECTION message the sender becomes its parent node.

Figure 6-22. Node a is the source. Messages have a unique ID to manage possible concurrent elections

Figure 6.22 When a node R receives its first election message, it designates the source Q as its parent, and forwards the message to all neighbors except Q. When R receives an election message from a non-parent, it just acknowledges the message

If R’s neighbors have parents, R is a leaf; otherwise it waits for its children to forward the message to their neighbors. When R has collected acks from all its neighbors, it acknowledges the message from Q. Acknowledgements flow back up the tree to the original source.

Wireless Elections At each stage the “most eligible” or “best” node will be passed along from child to parent. Once the source node has received all the replies, it is in a position to choose the new coordinator. When the selection is made, it is broadcast to all nodes in the network.

Wireless Elections If more than one election is called (multiple source nodes), a node should participate in only one. Election messages are tagged with a process id. If a node has chosen a parent but gets an election message from a higher numbered node, it drops out of the current election and adopts the high numbered node as its parent. This ensures only one election makes a choice.

Related Works Vasudevan, Sudarshan, et al. "Leader election algorithms for wireless ad hoc networks." DARPA Information Survivability Conference and Exposition, 2003. Proceedings. Vol. 1. IEEE, 2003. Vasudevan, Sudarshan, Jim Kurose, and Don Towsley. "Design and analysis of a leader election algorithm for mobile ad hoc networks." Network Protocols, 2004. ICNP 2004. Proceedings of the 12th IEEE International Conference on. IEEE, 2004. Gusella, Riccardo, and Stefano Zatti. An election algorithm for a distributed clock synchronization program. No. UCB/CSD-86/275. CALIFORNIA UNIV BERKELEY DEPT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCES, 1985.

Thank you for listening