0% found this document useful (0 votes)
2 views

Explain Need for election algorithm

Election algorithms are essential in distributed systems to select a coordinator from a group of independent processes that communicate over a network. The Bully Algorithm and the Ring Algorithm are two methods used for electing a new coordinator when the current one fails, with the Bully Algorithm ensuring that the process with the highest priority number becomes the new leader. These algorithms facilitate the management and coordination of tasks in a distributed environment, ensuring system reliability and efficiency.

Uploaded by

Karan Patel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Explain Need for election algorithm

Election algorithms are essential in distributed systems to select a coordinator from a group of independent processes that communicate over a network. The Bully Algorithm and the Ring Algorithm are two methods used for electing a new coordinator when the current one fails, with the Bully Algorithm ensuring that the process with the highest priority number becomes the new leader. These algorithms facilitate the management and coordination of tasks in a distributed environment, ensuring system reliability and efficiency.

Uploaded by

Karan Patel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Subject: DC Semester:VIII

What is the need of election algorithm?


Distributed system is a collection of independent computers that do not share their memory.
Each processor has its own memory and they communicate via communication networks.
Communication in networks is implemented in a process on one machine communicating with a
process on another machine
Many algorithms used in the distributed system require a coordinator that performs functions
needed by other processes in the system. Election algorithms are designed to choose a
coordinator. Election Algorithms: Election algorithms choose a process from a group of
processors to act as a coordinator.
Election is a process in Distributed Systems where we elect a leader/coordinator from the
existing processes/nodes in the network. All the nodes/processes in distributed systems are
uniform and any node can be appointed as a leader of the system. A node can be appointed as
a leader until it crashes.
Election algorithms are techniques for a distributed system of N processes to elect a coordinator
(leader). An example of this is the Berkeley algorithm for clock synchronization, in which the
coordinator has to initiate the synchronization and tell the processes their offsets.
Many algorithms used in distributed system require a coordinator that performs functions
needed by other processes in the system. Election algorithms are designed to choose a
coordinator. Election algorithms choose a process from group of processors to act as a
coordinator. If the coordinator process crashes due to some reasons, then a new coordinator is
elected on other processor. Election algorithm basically determines where a new copy of
coordinator should be restarted. Election algorithm assumes that every active process in the
system has a unique priority number. The process with highest priority will be chosen as a new
coordinator. Hence, when a coordinator fails, this algorithm elects that active process which has
highest priority number. Then this number is sent to every active process in the distributed
system. We have two election algorithms for two different configurations of distributed system.
1. The Bully Algorithm
2. The Ring Algorithm
Bully Algorithm: - This algorithm was proposed by Garcia-Molina. When the process notices that
the coordinator is no longer responding to requests, it initiates an election. A process, P, holds
an election as follows: (I) P sends an ELECTION message to all processes with higher
numbers. (II) If no one responds, P wins the election and becomes the coordinator. (III) If one of
the higher-ups answers, it takes over. P’s job is done.
a. A process can get an ELECTION message at any time from one of its lower numbered
colleagues.
b. When such a message arrives, 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.

Prof.S.S. Aloni Dept.of Computer Engineering


Subject: DC Semester:VIII

c. All processes give up except one that is the new coordinator. It announces its victory by
sending all processes a message telling them that starting immediately it is the new coordinator.
d. If a process that was previously down comes back up, it holds an election. If it happens to the
highest numbered process currently running, it will win the election and take over the
coordinator’s job. Thus, the biggest guy in town always wins, hence the name “bully algorithm”.
e. Example:

Prof.S.S. Aloni Dept.of Computer Engineering

You might also like