Benjamin
Benjamin

Reputation: 51

Why does Lamport's Distributed Mutual Exclusion Algorithm require the reply's timestamp to be greater than the request's timestamp?

In Lamport's Distributed Mutual Exclusion algorithm, a process can enter the critical section if two conditions are met:

  1. Its request is at the head of its own queue.
  2. It has received a reply from all other processes, and the timestamp of each reply is greater than its own request's timestamp.

I don't understand why the second condition is necessary. In my opinion, it should be sufficient for a process to simply receive a reply from all other processes without needing the timestamp of the reply to be greater than the request's timestamp. Is there a situation where the reply's timestamp matters, and if so, could someone give me one example and explain the reasoning behind it?

Upvotes: 0

Views: 15

Answers (0)

Related Questions