0
3.8kviews
What happens if two process detect failure of the coordinator simultaneously and both decide to hold election? Explain.
1 Answer
2
54views

1.Each of the higher-numbered processes will get two ELECTION messages, but will ignore the second one.

2.The election will proceed as shown:

  • 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.

Please log in to add an answer.