Clocks, Ordering and Happens-Before · graine 1 · A4, économe en encre. Le corrigé s'imprime sur sa propre page, pour les adultes.
En anglais

What clocks cannot tell you

Informatique · Réseaux et sécurité · de 20 à 21 ans
Nom ______________________   Date ____________
  1. A sends m1 to B. After receiving m1, B sends m2 to C. Which order is definite?

    • A's send, then B's send, then C's receive
    • Only B's send and C's receive are ordered
    • None of them, because the clocks drift apart
  2. Two events happen on different machines with no messages between them, and the two clocks drift apart by an unknown amount. What can the 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.

    En entourer un :   Vrai   Faux

  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 ruled out
    • The exact wall-clock time of each event
    • The speed of the network
  7. Three machines pass one token in a ring, and each stamps the token's arrival with its logical clock. What do the rising stamps along the ring reflect?

    • 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

Corrigé

Pour les adultes. Replier cette page avant de passer le reste.

What clocks cannot tell you W1-mt_ratia1eb_2-s1

  1. A's send, then B's send, then C's receive · Each message puts its send before its receive, and B receives m1 before it sends m2, so the three events form one chain.
  2. Nothing; clocks drift · With an unknown drift between the clocks, their stamps cannot settle the order of events on different machines.
  3. Faux · 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 ruled out · If a caused b, a has the lower count, so the counts rule out some causal orders. They give no times.
  7. The causal order of the handoffs along the ring · Each handoff is a message, so each arrival happens after the one before. The logical clock rises along that chain, so the stamps reflect the causal order the messages create.
  8. Stamps from drifting clocks cannot order message-free events · Without a message chain the pair is concurrent, whatever the stamps show.