written 8.7 years ago by |
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.