Skip to content
SEE Exam Prep

Question 2 of 6 · PYQ 2025 · 2 marks

Open in ChatGPT

Explain Logical Clocks in brief.


A logical clock is a counter that orders events by causality instead of physical time.

  • Why: physical clocks on different machines drift, so their timestamps cannot be compared.
  • Local event: increment the counter.
  • Sending a message: send the current counter with the message.
  • Receiving a message with timestamp t: set the counter to max(local, t) + 1.
  • Guarantee: if a → b then C(a) < C(b), but not the converse, so concurrency cannot be detected.