0

Basically the lamport clock helps the host to order the events rather than the exact time. How does all the logical clocks end up being converged in the long term?

  • 1
    What do you mean by "converge"? If you mean "all have the same value" then they won't -- at the very least, the last receiver will have a value 1 greater than its sender. Perhaps you can rewrite the question to be more clear by giving an example of a system and the communications between nodes, but as written this question doesn't make a lot of sense. – kdgregory Mar 19 '17 at 12:07
1

You're absolutely right about this not being about the exact time. We don't even care what the real time is. We care about keeping the clocks in sync with each other. That can be made evident this psudocode from wikipedia

The algorithm for sending a message:

time = time+1;
time_stamp = time;
send(message, time_stamp);

The algorithm for receiving a message:

(message, time_stamp) = receive();
time = max(time_stamp, time)+1;

The essential pattern here is fastest clock wins. That's not a good way to keep actual time since any clock is as likely to gaining time as losing time. But it ensures no messages are scrambled by the corrections. Since all we're trying to do is create a reliable, if partial, ordering of messages we don't care that the atomic clocks in Colorado say we're way off.

You can call this behavior "converged" if you like but I see it as all the clocks being dragged forward by one hyperactive clock because we care more about being in sync than about being correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.