Linearizability and Checking a History · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

One instant per operation

Computing · Networks & Security · ages 22-23
Name ______________________   Date ____________
  1. A write of x = 2 finishes. Then a read of x starts. What must the read return?

    • 1, the value from before
    • 2
    • Either 1 or 2
  2. Each operation appears to take effect at one instant. Where must that instant sit?

    • Between its call and its return
    • Before its call
    • After its return
  3. A write of x = 1 completes, then a read of x returns 1. This history is linearizable.

    Circle one:   True   False

  4. A write of x = 1 finishes, then a write of x = 2 finishes, then a read returns 1. What is the verdict?

    • Not linearizable, and the read is the conflict
    • Linearizable, with the read placed last
    • Linearizable, with the two writes swapped
  5. A write of x = 1 and a write of x = 2 overlap in time. A concurrent read returns 1. Is there a single-object explanation?

    • No, overlapping writes never allow one
    • No, the read would have to return 2
    • Yes, the read can sit before both writes
  6. The clients and the server log disagree about which operation ran first. What decides the check?

    • The order the server executed them
    • Whichever order makes the history valid
    • The client call and return times
  7. Write A finishes. Then write B overlaps a read that returns B. Which single-object order explains it?

    • B, then A, with the read beside B
    • A, then B, with the read before A
    • A, then B, with the read beside B
  8. Sam says a history is fine because the server ran the read before the write. The client saw the write finish first. What is wrong?

    • Reads always outrank writes
    • Server order never decides, client windows do
    • Overlapping operations are forbidden
LightMySky · lightmysky.comW1-mt_lTaHmlGtuo-s1

Answer key

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

One instant per operation W1-mt_lTaHmlGtuo-s1

  1. 2 · Real-time order is law: the finished write comes first.
  2. Between its call and its return · The instant belongs to the operation, so it lives inside its window.
  3. True · Write then read explains every answer.
  4. Not linearizable, and the read is the conflict · The read finished after both writes yet missed the latest one.
  5. Yes, the read can sit before both writes · Concurrent operations may order either way, so the read fits first.
  6. The client call and return times · The check uses client-observed windows, never server order.
  7. A, then B, with the read beside B · Real-time order fixes A first; the read sits with B.
  8. Server order never decides, client windows do · Only the client windows constrain where instants may sit.
Worksheet · LightMySky