Clocks, Ordering and Happens-Before · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

What clocks cannot tell you

Computing · Networks & Security · ages 20-21
Name ______________________   Date ____________
  1. A sends a message to B, and B later sends one to C. Which order is definite?

    • A before B before C
    • Only B and C are ordered
    • None, since clocks drift
  2. Two events happen on different machines with no messages between them. What can clocks say about their order?

    • The exact order, down to the millisecond
    • The order, if both clocks are digital
    • Nothing; clocks drift
  3. A logical clock measures real time in seconds.

    Circle one:   True   False

  4. B receives m1 from A and then sends m2 to C. Why is A's send definitely before C's receive?

    • Because both machines share one clock
    • Because m2 is larger than m1
    • Because the chain A to B to C carries information forward
  5. A and C never exchange messages, directly or through anyone. How are their events related?

    • Ordered, with A always first
    • Concurrent and unordered
    • Ordered, with C always first
  6. What can you read off a logical clock?

    • Which causal orders are possible
    • The exact wall-clock time of each event
    • The speed of the network
  7. Three machines pass one token in a ring, each stamping receipt with its logical clock. What do rising stamp values down the ring prove?

    • The exact seconds each handoff took
    • That all three clocks show the same time
    • The causal order of the handoffs along the ring
  8. A's stamp reads 10:00:05 and B's reads 10:00:03 for events with no messages between them. A newcomer says B's event came first. What is wrong?

    • Nothing, earlier stamps always win
    • Stamps from drifting clocks cannot order message-free events
    • The newcomer read the wrong machine names
LightMySky · lightmysky.comW1-mt_ratia1eb_2-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

What clocks cannot tell you W1-mt_ratia1eb_2-s1

  1. A before B before C · Each message links its sender's event before its receiver's event.
  2. Nothing; clocks drift · Drifting clocks never truly compare across machines.
  3. False · It counts causal steps. Real time is exactly what it cannot give.
  4. Because the chain A to B to C carries information forward · Happened-before links chain together through middlemen.
  5. Concurrent and unordered · No message chain means no happened-before in either direction.
  6. Which causal orders are possible · It tracks cause through counted steps, never seconds.
  7. The causal order of the handoffs along the ring · Token passing is a message chain, and the clock mirrors its order.
  8. Stamps from drifting clocks cannot order message-free events · Without a message chain the pair is concurrent, whatever the stamps show.
Worksheet · LightMySky