6.5 Election Algorithms -Avinash Madineni.

Slides:



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

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.
1 Algorithms and protocols for distributed systems We have defined process groups as having peer or hierarchical structure and have seen that a coordinator.
Page 1 Mutual Exclusion* Distributed Systems *referred to slides by Prof. Paul Krzyzanowski at Rutgers University and Prof. Mary Ellen Weisskopf at University.
Leader Election Bismita Srichandan. Leader Election What is Leader Election Why Leader election is needed Different design topologies Algorithms used.
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
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
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.
Synchronization Clock Synchronization Logical Clocks Global State Election Algorithms Mutual Exclusion.
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.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
Clock Synchronization and algorithm
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Systems CS Programming Models- Part I Lecture 13, Oct 13, 2014 Mohammad Hammoud 1.
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.
Timing-sync Protocol for Sensor Networks (TPSN) Presenter: Ke Gao Instructor: Yingshu Li.
Vinay Kumar Madhadi 09/23/2009 CSC Outline  Part 1 : Leader Election?  Part 2 : Different Design Topologies Algorithms Used-Bully, Ring, Invitation.
Multi-level Hashing for Peer-to-Peer System in Wireless Ad Hoc Environment Dewan Tanvir Ahmed and Shervin Shirmohammadi Distributed & Collaborative Virtual.
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.
4.5 DISTRIBUTED MUTUAL EXCLUSION MOSES RENTAPALLI.
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.
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.
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.
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.
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.
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.
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.
Lecture 11: Coordination and Agreement Central server for mutual exclusion Election – getting a number of processes to agree which is “in charge” CDK4:
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Coordination and Agreement
CSE 486/586 Distributed Systems Leader Election
Advanced Topics in Concurrency and Reactive Programming: Time and State Majeed Kassis.
Election algorithm Who wins? God knows.
Distributed Processing Election Algorithm
Chapter 6.3 Mutual Exclusion
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
EEC 688/788 Secure and Dependable Computing
CSE 486/586 Distributed Systems Leader Election
Lecture 10: Coordination and Agreement
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Prof. Leonardo Mostarda University of Camerino
Lecture 11: Coordination and Agreement
Leader Election Bernard Chen.
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

6.5 Election Algorithms -Avinash Madineni

Outline Introduction Types of Election Algorithms Present Scenario Ongoing research

What are Election Algorithms Distributed algorithms require one process to act as coordinator, initiator, or otherwise perform some special role. It doesn’t matter which process takes on this special role Why? To achieve SYNCHRONIZATION If all processes are exactly the same => no way to select one of them to be special

Goal of Election Algorithm To ensure that when an election starts, it concludes with all processes agreeing on who the new coordinator is Assumptions Each process has a unique number. Eg- its network address We will assume one process per machine for simplicity Every process knows the process number of every other process But the processes do not know which ones are currently up and which ones are currently down

Types of Election Algorithms Traditional Election Algorithms Elections in Wireless Environments Elections in Large-Scale Systems

Traditional Election Algorithms -> The Bully Algorithm and the Ring Algorithm The Bully Algorithm Was devised by Garcia Molina in 1982 If process notices that the coordinator is no longer responding to requests, it initiates an election

The Bully Algorithm A process, P, holds an election as follows: 1. P sends an ELECTION message to all processes with higher numbers. 2. If no one responds, P wins the election and becomes coordinator. 3. If one of the higher-ups answers, it takes over. P's job is done

Contd.. A process can get an ELECTION message from one of its lower-numbered colleagues at any moment The receiver sends an OK message back to the sender to indicate that he is alive and will take over The receiver then holds an election, unless it is already holding one Eventually, all processes give up but one, and that one is the new coordinator The winner sends out a new message informing everyone that it is the new coordinator. If a process that was previously down comes back up, it holds an election and bullies the present coordinator and takes over

Explaining Bully Algorithm Group consists of 8 process numbered 0 to 7 Previously process 7 was the coordinator Process 4 is the first one to notice and sends out ELECTION messages to higher processes Processes 5 and 6 both respond with OK Process 4 hands over the election process. Process 5 and 6 takes over. Process 6 informs others that it is the new coordinator

Ring Algorithm Election algorithm is based on the use of a ring Assume that the processes are physically or logically ordered, so that each process knows who its successor is. If a process notices that the coordinator is not functioning, it builds an ELECTION message containing its own process number and sends the message to its successor If the successor is down, the sender skips over the successor and goes to the next member along the ring or the one after that, until a running process is located The sender adds its own process number to the list at each step

Contd.. Eventually the message gets back to the process that started it all That process recognizes this event when it receives an incoming message containing its own process number Then the message type is changed to COORDINATOR and circulated once again This is to inform everyone who the new coordinator is and the who the members of the new ring are The COORDINATOR message is removed after it is circulated once

Example of Ring Algorithm Processes 2 and 5 discover simultaneously that the previous coordinator, process 7, has crashed. Each builds an ELECTION message and circulates them independently Both messages will go all the way around and converts to COORDINATOR message After the COORDINATOR message goes around, Process 6 is declared the new coordinator

Elections in Wireless Environments Traditional election algorithms are generally based on assumptions that are not realistic in wireless environments. For example - they assume that message passing is reliable and that the topology of the network does not change Vasudevan et al. (2004) proposed a solution that can handle failing nodes and partitioning networks

Contd.. Any node in the network, called the source, can initiate an election by sending an ELECTION message to its immediate neighbors When a node receives an election message, it designates the sender as parent. Then it sends out the ELECTION message to all its immediate neighbors except for the parent. A node merely acknowledges any message that is received from any other node apart from its parent

Contd.. Node a initiates an ELECTION message by broadcasting to nodes b and j Node b marks a as parent and passes the ELECTION message to node g The election message it transmitted till the leaf nodes Each nodes then transmit back the best available option to its parent node

Contd.. Node g has node e and h as child nodes but it will propagate only the best node i.e [h,8] back to its own parent. When multiple elections are initiated, nodes tend to join the ones having highest identifier in the source tag

Elections in Large-Scale Systems Above discussed situations deal with selecting one coordinator as they are small distributed systems For a larger network, a situation arises where we need to select super peers in a peer- to-peer network.

Contd.. Requirements for Superpeers selection 1. Normal nodes should have low-latency access to Superpeers. 2. Superpeers should be evenly distributed across the overlay network. 3. There should be a predefined portion of Superpeers relative to the total number of nodes in the overlay network. 4. Each Superpeers should not need to serve more than a fixed number of normal nodes.

Contd.. Requirements are relatively easy to meet in most peer-to-peer systems as the over lay network is either DHT based or randomly unstructured. In DHT networks, Idea is to reserve a fraction of the identifier space for Superpeers Each node receives a m-bit identifier and first k bits are reserved to identify the Superpeers For N superpeers, first rlog2(N)l bits of any key can be used to identify the Superpeers

Contd.. Total of N tokens are spread across N randomly-chosen nodes Each token represents a repelling force by which another token is inclined to move away If all tokens exert the same repulsion force, they will move away and spread evenly in the geometric space

Modified Election Algorithm-1 Uses several ordered nodes composing coordination group {coordinator, alternative1, alternative2,…alternative k} These nodes prevent global election between all nodes Advantages Method intensively decreases the number of messages that should be exchanged between processes

Contd.. When Process 2 notices that the Process 7 is crashes, it sends crash-leader message to alternative 1 Alternative 1 sends ok message to process 2 Alternative 1 checks with process 7 before announcing itself as a coordinator

Modified Election Algorithm-2 After noticing the coordinator is down the process p[i] sends out an ELECTION message The process p[i] will receive OK messages from the nodes which are ACTIVE and higher than p[i] The process p[i] will select the biggest node it has received and announces it as a coordinator. Advantages This will reduce the no. of steps and the latency

Future Work The Bully algorithm is one algorithms that is being modified to achieve better latency, reduced usage of bandwidth and reduced messages. Efforts are being made to improvise the Bully algorithm to best suit the Election mechanism in Wireless networks by considering Node degree and Residual Battery Power

References 1] H. C. Cahng, C. C. Lo, “A Consensus-Based Leader Election Algorithm for Wireless Ad Hoc Networks,” 2012 International Symposium on Computer, Consumer and Control, Taichung, Dec. 2012. 2] M. Gholipour, M. S. Kordafshari, M. Jahanshahi, A. M. Rahmani, “A new approach for election algorithm in distributed systems” 2009 Second International Conference on Communication Theory, Reliability, and Quality of Service,Colmar, France, Jul. 2009. 3] M. Shirali, A. H. Toroghi, M. Vojdani, “Leader election algorithms: History and novel schemes,” 2008 International Conference on Convergence and Hybrid Information Technology, Busan, Nov. 2008.

Questions?

Thank you