The bully algorithm Flashcards
when can we let processes crash during the election?
We can if we assume that the system is synchronous, so we can use timeouts to detect process failure
state the Bully algorithm assumptions
Bully algorithm assumes that each process knows which
processes have higher identifiers, and can communicate with
each such process
Name the Three types of messages in this algorithm
♦ election – announces an election
♦ answer – sent in response to an election message
♦ coordinator – announces identity of the elected process
how is an election initiated?
A process initiates an election when it notices, through timeouts,
that the current coordinator has failed – several processes may
discover this concurrently
What does Synchronous system assumptions enable?
construction of a reliable failure detector
Give the upper bound on the total elapsed time from sending a message to another process to receiving a response
T = 2 (T[trans] + T[process])
What is T[trans]?
maximum transmission delay
What is T[process]?
maximum processing delay in a process
When and how can a process elect itself?
Process that knows it has the highest identifier can elect itself as the coordinator by sending a coordinator message to all processes with smaller identifiers
What does a process with a lower identifier do? (3 things)
♦ Sends an election message to processes with higher identifiers and awaits an answer message in response
♦ if none arrives within time T, process considers itself the coordinator and sends a coordinator message to all processes with lower identifiers
♦ else waits T’ for a coordinator message to arrive from the new coordinator – if none arrives, it calls (begins) another election
What happens when process p[i] receives a coordinator message?
If p[i] receives a coordinator message, sets elected[i]
to the identifier of the coordinator contained in the
message
What happens when process p[i] receives a election message?
If a process receives an election message, it sends
back an answer message and begins another election, unless it has begun one already
What happens when a process is started to replace a crashed process?
it begins an election
What happens when a process is started to replace a crashed process and that process has the highest identifier?
♦ if it has the highest identifier, then it will
announce itself as the new coordinator, even though the
current coordinator is functioning
♦ i.e. it “bullies” its way into being the coordinator
Performance of bully algorithm - how does it meet E2 (liveness) ?
E2 (liveness) is met by the assumption of reliable message delivery