A Comparative Analysis Of Various Election Algorithms In

A Comparative Analysis Of Various Election Algorithms
In Distributed Systems
Govind Patel
1
Rakesh Patel
2
1(PG Student of Computer Engineering, Merchant Engineering College, Basna, Visnagar, Gujarat, India)
2(Assistant Professor, Sankalchand Patel College Of Engineering, Visnagar, Gujarat, India)
Abstract- A distributed system is one in which components located at networked computers communicate
and coordinate their actions only by passing messages. Many distributed systems require one process to
act as coordinator and the coordinator responsibilities are to manage the message passing and allocation
of resources. This paper describes and compares two different election algorithms on the basis of message-passing
overhead.
Keywords - Distributed system, Coordinator
1. INTRODUCTION
In distributed system, there is one process (coordinator) that coordinates all the other processes. This
coordinator is responsible for managing the message passing and allocation of resources. There are
different group algorithms that create a particular coordinator group. Coordinator group has one
coordinator and others are alternatives. If a coordinator fails due to any reason, any alternative will be
elected as a new coordinator.
ELECTION ALGORITHM
An election algorithm picks a unique coordinator. An election algorithm is an algorithm for solving the
coordinator election problem. Various algorithms require a set of peer processes to elect a leader or a
coordinator. It is necessary to determine a new leader if the current coordinator fails to respond. Among
all the algorithms, Bully and Ring algorithms have gained more popularity for coordinator election[1].
In this paper, we discuss two group algorithms. We show the comparison of two algorithms with their pros
and cons.
2. Bully Election Algorithm with Coordination Group
In this modified Bully algorithm, a process with greatest number is selected as a coordinator. Similarly,
some other processes which have the next priority numbers are selected as alternative1, alternative2,..
alternativeK[2]. Their process numbers are sent to all processes.
When process P notices that the coordinator is crashed, sends crash-leader message to alternative1
informing coordinator is crashed. If alternative1 is alive, it sends ok message to process p. Then it sends
a message to coordinator to be sure that whether a coordinator is crashed or not. If a coordinator is not
crashed, it realizes that the process P made a mistake and the algorithm is finished. Otherwise
alternative1 is selected as coordinator and broadcasts coordinator message.
When process P notices that all members of the coordinator group have crashed, it initiates an election
algorithm. It sends ELECTION message to all other processes with higher priority number. Each process
that receives ELECTION messages sends OK message with its unique priority number to process P.
a) If no process responses to process P, In this case p is selected as coordinator. Then it sends a
message to processes with lower number in order to select other members of the coordination group and
waits 2d time steps. After receiving all process ids, it selects k-1 higher process as members of
coordination group and it will broadcast one Coordinator message to all processes, declaring coordinator
group member.
b) If some process response to process P, the process P will select the coordinator group i.e. Process
with the highest priority number as coordinator and k higher processes as altarnative1 and alternative
2,…alternative k, then it sends to the new coordinator the GRANT message.
Figure 1: Bully Election Algorithm with Coordination Group
Advantages
It reduces redundant elections. It also reduces the number of message passing by forming a coordinatorgroup. Once the group is formed, it is easy to select the next highest priority node from the group when
the coordinator fails. The complexity of this algorithm is O (n).
Limitations
The coordinator group cannot get modified even if the current coordinator fails. The main problem is to
create a coordination group, which takes many messages.
3. Bully algorithm Using Two Successors
Initially the process which has highest process number is elected as a coordinator. A coordinator selects
two successors named as main successor and sub successor. For this process, it takes four messages.
When any process comes to know that a coordinator has crashed, it directly informs to main successor.
Then the main successor verifies that whether coordinator has crashed or not. If coordinator is crashed,
then it announces itself as a coordinator and sends [n-2] coordinator messages to all the processes.
Otherwise it ignores an election message [3].
Suppose, any process gets crashed and recovers from failure, it tries to know who the current coordinator
is. For that, it sends messages to coordinator, main successor and sub successor, and receives reply
messages from coordinator, main successor and sub successor. For this, it uses six messages [3]. This
process is demonstrated in following figure.
Figure 2: Bully algorithm Using Two Successors
Advantages
It reduces the number of messages for making two successors. It removes redundant elections. The
number of messages are reduced. It neglects the message-passing overhead. The complexity of this
algorithm is O (n).
Conclusion
In two successor approach, when a process finds failure of a coordinator, then it directly contacts to the
successor . So, there is no message-passing overhead. In coordination group approach, if all members
of group is cashed, then it needs to create new coordination group. So, it requires many messages to
create new coordination group.
References
[1]
Garcia – Molina “Elections in a distributed computing system”, IEEE transactions on computers, vol
C-31, No 1,pp 48-59,1982.
[2] M. Gholipour, M.S Kordafshari, M. Jahanshahi, A.M. Rahmani “New Approach for Election
Algorithm in Distributed Systems”, IEEE Computer Soc.,2009
[3] Basim Alhadidi, Laith H.Baniata and Mohammad H.Baniata, Mohammad Al-Sharaiah “Reducing
Massage Passing and Time Complexity in Bully Election Algorithms Using Two Successors”, March,
2013
[4] Muhammad Mahbubur Rahman, Afroza Nahar “Modified Bully Algorithm using Election
Commission”, 2010
[5]
Sinha P.K, “Distributed Operating Systems Concepts and Design”, Prentice-Hall of India private
Limited, 2008
[6]
M. S. Kordafshari, M. Gholipour, M.Jahanshahi, A.T.Haghighat, “Modified bully election algorithm in
distributed system”, WSEAS Conferences, Cancun,Mexico, May 11-14,2005
[7] Sandipan Basu “An Efficient Approach of Election Algorithm in Distributed Systems” - (IJCSE), Vol
20,No 1,2010.
[8] Heta Jasmin Jhaveri, Sanjay Shah “A Comparative Analysis
of Election Algorithm in Distributed
Systems”- A Special Issue from IJCA, 2011
[9] Tanenbaum A.S, “Distributed Operating System”, Pearson Education, 2007.