Study of Various Election Algorithms On The Basis of Message-Passing Approach
Study of Various Election Algorithms On The Basis of Message-Passing Approach
org
Abstract: An important challenge in distributed systems is the adoption of suitable and efficient algorithms for
coordination selection. The leader election is important problem in distributed system as data is distributed among different node which is geographically separate. For maintaining co-ordination between the node, leader node have to be selected. The main role of an elected coordinator is to manage the use of shared resources in optimal manner. This paper represents the different election algorithms with their limitations as well comparative analysis of them, efficiency in terms of number of messages exchanged in each case and the complexity of various coordinator selection algorithms in distributed systems. Keywords: Distributed system, Election, Coordinator, Priority
I.
Introduction
In a distributed computing system, a node is used to coordinate many tasks. It is not an issue which node is doing the task, but there must be a coordinator that will work at any time. An election algorithm is an algorithm for solving the coordinator election problem. Various algorithms require a set of peer nodes to elect a leader or a coordinator. Elections may be needed when the system is initialized, or if the coordinator crashes or retires [2]. A Distributed system is a collection of autonomous computing nodes which can communicate with each other and which cooperate on a common goal or task. Tanenbaum and van Renesse: A distributed system is one that looks to its users like an ordinary, centralized, system but runs on multiple independent CPUs.[2] A distributed system is a collection of processors interconnected by a communication network in which each processor has its own local memory and other peripherals and the communication between them is held by message passing over the communication network. [1] A. Features of Distributed System 1. Inherently distributed applications 2. Information sharing among distributed users 3. Resource sharing 4. Better price performance ratio 5. Shorter response times and higher throughput 6. Higher reliability 7. Extensibility and incremental growth 8. Better flexibility in meeting users needs B. Need of Election Several distributed algorithms require that there be a coordinator node in the entire system that performs some type of coordination activity needed for the smooth running of other nodes in the system. As the nodes in the system need to interact with the coordinator node, they all must unanimously who the coordinator is. Also if the coordinator node fails due to some reason (e.g. link failure) then a new coordinator node must be elected to take the job of the failed coordinator.
II.
A. Bully Algorithm by Garcia Molina [2][7] Bully algorithm is one of the most famous election algorithms which were proposed by Garcia-Molina in 1982. Assumptions: 1. It is a synchronous system and it uses timeout Mechanism to keep track of coordinator failure detection. www.iosrjournals.org 23 | Page
Figure 1: Bully algorithm example (a) process 4 detects coordinator is failed and holds an election, (b) process 5 and 6 respond to 4 to stop election, (c) each of 5 and 6 holds election now, (d) process 6 responds to 5 to stop election, (e) process 6 winds and announces to all.
Bully algorithm has following limitations: 1. The main limitation of bully algorithm is the highest number of message passing during the election and it has order O (n2) which increases the network traffic. 2. When any node that notices coordinator is down then holds a new election. As a result, there May n number of elections can be occurred in the system at a same time which imposes heavy network traffic. 3. As there is no guarantee on message delivery, two nodes may declare themselves as a coordinator at the same time. Say, P initiates an Election and didnt get any reply message from Q, where Q has a higher node number than P. At that case, p will announce itself as a coordinator and as well as Q will also initiate new election and declare itself as a coordinator if there is no node having higher node number than Q. 4. Again, if the coordinator is running unusually slowly (say system is not working properly for some reasons) or the link between a node and a coordinator is broken for some reasons, any other node may fail to detect the coordinator and initiates an election. But the coordinator is up, so in this case it is a redundant election. Again, if node P with lower node number than the current coordinator, crashes and recovers again, it will initiate an election from current state. www.iosrjournals.org 24 | Page
Figure 2 : Election Procedure: (a) Process 2 detects current coordinator is down and sends an election message to EC, (b) EC verifies either the coordinator is really down or not,(c) EC finds the alive process with highest number using alive message,(d) EC sends coordinator message to all process having process number of currently won.
III.
In Bully algorithm[7], when the process having the lowest priority number detects the coordinators failure and initiates an election, in a system of n processes, altogether (n-2) elections are performed. All the processes except the active process with the highest priority number and the coordinator process that has just failed perform elections. So in the worst case, the bully algorithm requires O(n2) messages. When the process having the priority number just below the failed coordinator detects failure of coordinator, it immediately elects itself as the coordinator and sends n-2 coordinator messages. So in the best case, it has O(n) messages. During recovery, a failed process must initiate an election in recovery. So once again, Bully algorithm requires O(n2) messages in the worst case, and (n-1) messages in the best case. In ring algorithm, on the contrary, irrespective of which process detects the failure of coordinator and initiates an election, an election always requires 2(n-1) messages. (n-1) messages needed for one round rotation of the ELECTION message, and another (n-1) messages for the COORDINATOR message. During recovery, a failed process does not initiate an election on recovery, but just searches for the current coordinator. So ring algorithm only requires n/2 messages on average during recovery. [3]
www.iosrjournals.org
26 | Page
IV.
Conclusion
In this paper, we have shown the comparison between various election algorithms in a distributed system. The comparison is done on the basis of number of messages passed and time complexity parameters of algorithms. Some algorithms overcome the overhead the sending of number of messages. This paper also focuses on limitations of different algorithms for coordinator selection.
References
[1] [2] [3] [4] [5] [6] [7] Sinha P.K, Distributed Operating Systems Concepts and Design, Prentice-Hall of India private Limited, 2008. Tanenbaum A.S Distributed Operating System, Pearson Education, 2007. Heta Jasmin Javeri, Sanjay Shah A Comparative Analysis of Election Algorithm in Distributed System IP multimedia communication, a special issue from IJCA Sachi Choudhary, Dipesh SharmaA Comparative Analysis in Terms of Message Passing & Complexity of Different Coordinator Selection Algorithms in Distributed System, a special issue from IJARCET, Volume 1, Issue 7, September 2012 Deepali P. GawaliLeader Election Problem in Distributed Algorithm, a special issue from IJCST Vol. 3, Issue 1, Jan. - March 2012 Muhammad Mahbubur Rahman, Afroza NaharModified Bully Algorithm using Election Commission H.Garcia Molina Election in a distributed Computing System. IEEE Trans. Comp, 1982, vol31, no. 1, pp. 48-59. 1982
www.iosrjournals.org
27 | Page