What happens if the two process detect failure of the coordinator simultaneously and both decide to hold election? Explain?
Answers
Heya!!
The processes are as follows:-
●When a process receives an ELECTION message, it checks to see who started it.
●If it itself started it (i.e., its number is at the head of the list), it turns the message into a COORDINATOR message.
●If it did not start any ELECTION message, it adds its process number and forwards it along the ring.
●However, if it did send its own ELECTION message earlier and it has just discovered a competitor, it compares the originator's process number with its own.
●If the other process has a lower number, it discards the message instead of passing it on.
●If the competitor is higher, the message is forwarded in the usual way.
●In this way, if multiple ELECTION messages are started, the one whose first entry is highest survives.
●The rest are killed off along the route.
Thanks!!