FreeExam

Distributed systems engineer: Clocks Ordering and Causality

Original interview cases on event graphs, logical and vector clocks, physical uncertainty, session context, deadlines, lifecycle identity, causal snapshots, and ordering evidence.

These prompts are original practice. They are not questions from a named employer or a live hiring loop.

  1. 1.Process P sends m before its later local event p2. Process Q receives m before its local event q2. No other edges are known. Which relation is established by the message path?

    Show answer and explanation
    1. The send of m precedes q2 causally.
    2. The receive of m precedes its send.
    3. q2 necessarily precedes p2.
    4. p2 necessarily precedes q2.

    Answer: The send of m precedes q2 causally.

    A send precedes its matching receive, and local order extends that relation to q2. The supplied graph does not order p2 against q2.

  2. 2.Two events occur on different processes with no local or message path connecting them in either direction. Under the specified happened-before relation, how are they classified?

    Show answer and explanation
    1. Necessarily simultaneous in physical time
    2. Concurrent in that relation
    3. Ordered by whichever log line was collected first
    4. Necessarily equal in every logical timestamp

    Answer: Concurrent in that relation

    Concurrency here means lack of causal ordering in the model. It does not assert exact physical simultaneity or equal clock values.

  3. 3.A local event a precedes a send b. Its matching receive c precedes event d on the receiver. Which relation follows by transitivity?

    Show answer and explanation
    1. a precedes d causally.
    2. No relation exists because a and d are on different hosts.
    3. d precedes a causally.
    4. a and d must share one wall-clock timestamp.

    Answer: a precedes d causally.

    The path a→b→c→d establishes causal precedence across hosts. Physical clock synchronization is not needed for this graph relation.

  4. 4.A trace has P events p1→p2 and Q events q1→q2, with a message p1→q2. Is p2 causally before q1 from this information alone?

    Show answer and explanation
    1. Yes; every P event precedes every Q event.
    2. Yes; message paths order all events on both hosts.
    3. No; that relation is not implied.
    4. No; cross-host causal relations are impossible.

    Answer: No; that relation is not implied.

    The known edges do not form a path from p2 to q1. Avoid inventing a total causal order from one cross-process message.

  5. 5.A trace collector receives log entries in order B then A, but A is a recorded message send and B its matching receive. What order should a valid causal reconstruction retain?

    Show answer and explanation
    1. A before B
    2. A guarantee collector arrival order equals execution order
    3. B before A
    4. Whichever entry has a longer payload

    Answer: A before B

    Collection delays can reorder logs. A matching send/receive relation gives a causal edge independent of the collector's arrival sequence.

  6. 6.A Lamport counter starts at 4. Under the stated rule, each local event increments it by one. Two local events occur with no receives. What is its value afterward?

    Show answer and explanation
    1. 8
    2. 4
    3. 6
    4. 5

    Answer: 6

    Applying the supplied increment rule twice gives 4+1+1=6. This counter measures a logical ordering, not elapsed seconds.

  7. 7.A receive rule sets L=max(current L,message L)+1. Current L is 7 and the message carries 12. What value follows?

    Show answer and explanation
    1. 12
    2. 20
    3. 8
    4. 13

    Answer: 13

    The receive takes the maximum 12 and adds one, yielding 13. This makes the receive timestamp greater than the message's send timestamp under the rule.

  8. 8.The same receive rule applies with current L=20 and message L=8. What next logical value results?

    Show answer and explanation
    1. 29
    2. 20
    3. 9
    4. 21

    Answer: 21

    The local value is already larger, so max(20,8)+1=21. Receiving an old message does not move this logical counter backward.

  9. 9.Under a correct Lamport timestamp construction, event a causally precedes b. What timestamp relation must hold?

    Show answer and explanation
    1. L(a)=L(b)
    2. The timestamp order is unconstrained by causality.
    3. L(a)<L(b)
    4. L(a)>L(b)

    Answer: L(a)<L(b)

    The clock condition makes causal precedence imply increasing logical timestamps. The converse does not hold for arbitrary events.

  10. 10.Two unrelated events have Lamport timestamps 5 and 9. What does that inequality alone establish about causality?

    Show answer and explanation
    1. It does not establish a causal path between them.
    2. Both events occurred on one process.
    3. The first necessarily caused the second.
    4. The events must have been physically simultaneous.

    Answer: It does not establish a causal path between them.

    Scalar logical timestamps can order concurrent events numerically. A smaller timestamp is necessary for causal precedence under the clock condition, not sufficient to prove it.

  11. 11.Events with equal Lamport counters are ordered by process ID for a deterministic total order. What does that tie-break add?

    Show answer and explanation
    1. Evidence of a causal message path
    2. A physical clock-synchronization guarantee
    3. A proof that all replicas have received the events
    4. An ordering choice for otherwise tied timestamps

    Answer: An ordering choice for otherwise tied timestamps

    A deterministic tie-break can extend an order but does not create causality or distribute missing information. Agreement on the ordered event set needs its own protocol.

  12. 12.Two replicas sort the events they currently know by the same deterministic timestamp rule. One has not received event X. What is still needed for equal complete output histories?

    Show answer and explanation
    1. A guarantee sorting partial sets makes their contents identical
    2. Only identical sorting code
    3. A protocol for event dissemination and safe delivery decisions
    4. Only a larger timestamp field

    Answer: A protocol for event dissemination and safe delivery decisions

    Ordering a known set does not establish that all participants have the same set or know when earlier events are complete. Delivery safety and dissemination are separate obligations.

  13. 13.An event at P has vector [3,1], and a later event at Q has [3,4]. Under componentwise vector ordering with at least one strict inequality, what relation holds?

    Show answer and explanation
    1. [3,4] precedes [3,1].
    2. The vectors are equal.
    3. The vectors are incomparable.
    4. [3,1] precedes [3,4].

    Answer: [3,1] precedes [3,4].

    Both components of [3,1] are no larger, and the second is smaller. This establishes the specified vector precedence relation.

  14. 14.Two versions have vectors [4,1] and [2,3]. Under componentwise ordering, what relation holds?

    Show answer and explanation
    1. The first precedes the second.
    2. They are incomparable.
    3. They must describe the same event.
    4. The second precedes the first.

    Answer: They are incomparable.

    The first vector is larger in one component and smaller in the other. Neither dominates the other under this model.

  15. 15.A vector-clock merge takes componentwise maximum. What is merge([2,5,1],[4,3,2])?

    Show answer and explanation
    1. [2,3,1]
    2. [4,5,2]
    3. [6,8,3]
    4. [4,3,2]

    Answer: [4,5,2]

    Take maxima independently: max(2,4)=4, max(5,3)=5, and max(1,2)=2. A receive algorithm may additionally increment its own component as separately specified.

  16. 16.At process index 1, a receive first merges current [2,3,0] with message [4,1,2], then increments component 1 using zero-based indexing. What vector results?

    Show answer and explanation
    1. [4,4,2]
    2. [6,5,2]
    3. [4,3,3]
    4. [5,3,2]

    Answer: [4,4,2]

    The merge gives [4,3,2]. Incrementing component index 1 changes its middle value to 4, producing [4,4,2].

  17. 17.A process restarts its vector-clock component at zero while keeping the same identity and allowing old versions to remain. What problem must the versioning design address?

    Show answer and explanation
    1. Only the number of log files
    2. Only the vector's display format
    3. Loss of identity-lifetime monotonicity
    4. A guarantee restarts erase all causal history everywhere

    Answer: Loss of identity-lifetime monotonicity

    Reusing an identity with reset counters can collide with or misorder prior history. Use a justified epoch, durable state, or other lifecycle design consistent with the clock model.

  18. 18.Two independent writers accidentally share one vector-clock component identity. What information can be corrupted?

    Show answer and explanation
    1. A guarantee shared identities improve concurrency detection
    2. The model's distinction between their histories
    3. Only the size of the stored values
    4. Only their wall-clock time zones

    Answer: The model's distinction between their histories

    Vector components represent defined participants or histories. Identity collisions can make independent progress look like one sequence and invalidate causal interpretation.

  19. 19.A system removes an old writer's vector component from retained versions to save space. What needs a sound retirement argument?

    Show answer and explanation
    1. Only the shorter vector's length
    2. A guarantee deleting metadata preserves all version relationships
    3. Only the writer's display name
    4. How causality and stale-version handling remain correct

    Answer: How causality and stale-version handling remain correct

    Metadata compaction can lose information needed to distinguish dominance, concurrency, and old updates. Define the lifecycle and stale-data assumptions supporting removal.

  20. 20.A version vector is attached only to the final value, while an update depends on a read whose context is discarded. What can be lost?

    Show answer and explanation
    1. Only the value's byte count
    2. A guarantee dependency tracking is automatic from content alone
    3. Only the model's physical timestamp
    4. The update's dependency information

    Answer: The update's dependency information

    Causal metadata must include relevant observed context. A value's text alone does not reconstruct which prior versions the writer observed.

  21. 21.A client reads a document version and then posts a comment referring to it. What context can a causal API require on the comment write?

    Show answer and explanation
    1. The observed document dependency
    2. Only the comment's creation time on the client
    3. A guarantee all replicas already hold the document
    4. Only a random request ID with no dependency relation

    Answer: The observed document dependency

    Carrying dependency context lets the system enforce the required visibility relation. A wall-clock value or arbitrary identifier alone need not encode that dependency.

  22. 22.A replica has a comment but lacks its required parent version. Under a causal-delivery contract, what should it avoid?

    Show answer and explanation
    1. Buffering delivery according to the contract
    2. Exposing the dependent comment as if its prerequisite were available
    3. Recording that the prerequisite is missing
    4. Fetching the missing dependency

    Answer: Exposing the dependent comment as if its prerequisite were available

    Causal delivery constrains visibility of dependencies. The implementation may fetch, wait, redirect, or otherwise satisfy the declared contract rather than silently expose an inconsistent dependent view.

  23. 23.A causal context records dependencies on versions A3 and B7. A replica has A3 and B6. Which requirement remains unsatisfied?

    Show answer and explanation
    1. No requirement remains because B6 is close.
    2. Both A3 and B7 are absent.
    3. B7
    4. A3

    Answer: B7

    The context requires the specified B7 dependency, not merely any B version. More general dominance or version rules must be explicitly defined by the system.

  24. 24.A client moves between regions after reading version 12. Its next read must not return an older version. What session information can support that guarantee?

    Show answer and explanation
    1. A guarantee region switching preserves session history automatically
    2. A required minimum version or equivalent observed context
    3. Only the client's preferred locale
    4. Only a new TCP connection

    Answer: A required minimum version or equivalent observed context

    A monotonic-read mechanism needs relevant observed state and server enforcement. Transport movement alone does not establish the promised version relation.

  25. 25.A session promises read-your-writes for one user. What broader claim does that promise alone fail to establish?

    Show answer and explanation
    1. The user's ability to observe its own acknowledged write
    2. A single real-time order for every client's operation
    3. A defined session-scoped consistency property
    4. The possibility of implementing a session version token

    Answer: A single real-time order for every client's operation

    Session guarantees constrain specific histories. They do not automatically imply global linearizability or multi-object atomic snapshots.

  26. 26.Two services use database-generated sequences from independent databases and compare them as one global creation order. What is missing?

    Show answer and explanation
    1. A shared ordering contract across the sequence namespaces
    2. Only larger local sequence values
    3. A guarantee local monotonicity creates global comparability
    4. Only consistent decimal formatting

    Answer: A shared ordering contract across the sequence namespaces

    Independent sequences order within their own defined scope. Comparing their numbers does not create a cross-service event order without additional coordination or semantics.

  27. 27.A process allocates event numbers before transactions commit. Event 11 commits before event 10. What order do those numbers directly encode?

    Show answer and explanation
    1. Allocation order
    2. Visibility order necessarily
    3. Physical completion time necessarily
    4. Commit order necessarily

    Answer: Allocation order

    Identifiers reflect the event at which they are assigned. If assignment precedes commit, numerical order can differ from commit or visibility order.

  28. 28.A service sorts events by wall-clock timestamp and process ID. Two causally related events have inverted physical timestamps due to clock skew. What can the sort violate?

    Show answer and explanation
    1. Only the process IDs' uniqueness
    2. Causal order
    3. A guarantee tie-breaking repairs all skew inversions
    4. The fact that every tuple can be compared

    Answer: Causal order

    A process-ID tie-break handles equal timestamps, not inverted ones. Use an ordering protocol whose assumptions actually preserve the required causal relation.

  29. 29.One host's clock is ten seconds ahead. Its update wins every last-write-wins comparison against otherwise later real updates from other hosts. What does this illustrate?

    Show answer and explanation
    1. A proof that all losing writes were causally earlier
    2. A conflict rule's dependence on clock assumptions
    3. A guarantee the winning content is semantically newest
    4. Only a display-time-zone issue

    Answer: A conflict rule's dependence on clock assumptions

    A physical-time conflict rule can prefer clock error over later real activity. State its clock and conflict semantics rather than equate maximum timestamp with causal or user-intended recency.

  30. 30.A local deadline is computed from a wall clock that steps backward during execution. What measurement can avoid that particular elapsed-time error?

    Show answer and explanation
    1. A suitable local monotonic clock
    2. Only a more precise wall-clock string
    3. Only changing the time zone
    4. A guarantee all clocks advance monotonically

    Answer: A suitable local monotonic clock

    Elapsed-budget logic generally needs an appropriate monotonic time source. Its behavior across suspend and process or machine lifetimes still needs to match the intended contract.

  31. 31.A process's monotonic timestamp is sent to another machine and interpreted as that machine's absolute deadline. What assumption is generally missing?

    Show answer and explanation
    1. A common epoch and comparable clock semantics
    2. Only the timestamp's integer width
    3. A guarantee monotonic clocks on all machines share an origin
    4. Only a higher local counter value

    Answer: A common epoch and comparable clock semantics

    Local monotonic values are usually meaningful within a defined clock domain. Cross-machine deadlines need a justified representation and allowance for transit and clock uncertainty.

  32. 32.A caller has 90 ms remaining and spends 20 ms before a downstream attempt. Ignoring further overhead, what remaining local budget should that attempt receive?

    Show answer and explanation
    1. 110 ms
    2. 20 ms
    3. 70 ms
    4. 90 ms

    Answer: 70 ms

    Subtract elapsed local work: 90−20=70 ms. In practice, account for additional transit and execution reserves according to the deadline policy.

  33. 33.A downstream service receives an absolute wall-time deadline from a host whose error bound is unknown. What should the protocol design address?

    Show answer and explanation
    1. A guarantee absolute strings are universally accurate
    2. Only whether the timestamp parses
    3. Clock comparability and deadline uncertainty
    4. Only the request's payload size

    Answer: Clock comparability and deadline uncertainty

    A parsed timestamp does not establish a shared time reference. Define clock-error assumptions or an alternative budget protocol and its transit semantics.

  34. 34.A request expires locally, but the remote operation may already have committed. What does deadline expiration alone establish?

    Show answer and explanation
    1. The remote process crashed.
    2. The caller's waiting budget ended.
    3. The remote effect was rolled back.
    4. The operation never executed.

    Answer: The caller's waiting budget ended.

    A timeout or expired deadline is not proof of nonexecution or cancellation. The operation's outcome and retry handling need their own protocol.

  35. 35.A timestamp service returns a guaranteed interval [100,106] containing real time. A protocol may act only when real time is certainly greater than 104. Does this interval establish that condition?

    Show answer and explanation
    1. Only the interval width matters.
    2. Yes; its midpoint equals 103.
    3. Yes; its upper bound exceeds 104.
    4. No; its lower bound is not greater than 104.

    Answer: No; its lower bound is not greater than 104.

    To know time is greater than a threshold from a containing interval, the lower bound must exceed it. The upper bound alone does not establish that the threshold is in the past.

  36. 36.The same rule requires lower_bound>104. Which returned interval meets it?

    Show answer and explanation
    1. [104,108]
    2. [99,103]
    3. [105,111]
    4. [100,106]

    Answer: [105,111]

    The lower bound 105 exceeds 104. A lower bound equal to 104 does not satisfy the stated strict inequality.

  37. 37.Two event-time uncertainty intervals are A=[20,24] and B=[27,31], each guaranteed to contain its event's real time. What order is established?

    Show answer and explanation
    1. B occurred before A.
    2. The intervals cannot support any order.
    3. They occurred simultaneously.
    4. A occurred before B.

    Answer: A occurred before B.

    Every possible time for A is earlier than every possible time for B because 24<27. This is a physical-time relation, not by itself a message-causality claim.

  38. 38.Event intervals A=[20,28] and B=[25,31] overlap. What does that alone establish about their physical order?

    Show answer and explanation
    1. B necessarily occurred first.
    2. A necessarily occurred first.
    3. The events necessarily occurred simultaneously.
    4. The intervals do not resolve the order.

    Answer: The intervals do not resolve the order.

    Overlapping uncertainty permits different actual orders. More information, such as a causal edge, may establish a relation that these intervals alone cannot.

  39. 39.Each of two wall clocks has absolute error at most 3 ms from a common real-time reference. What is the largest possible pairwise clock disagreement?

    Show answer and explanation
    1. 3 ms
    2. 9 ms
    3. 6 ms
    4. 1.5 ms

    Answer: 6 ms

    One clock can be 3 ms fast while the other is 3 ms slow. Their difference can therefore be 3+3=6 ms under the supplied bounds.

  40. 40.A protocol is safe only while a stated clock-error bound holds. Monitoring can no longer justify that bound. What should its safety design specify?

    Show answer and explanation
    1. Only a more optimistic timestamp display
    2. Only how to hide the alarm
    3. How operations stop, wait, or switch to a safe alternative
    4. A guarantee uncertainty has no effect on time-based safety

    Answer: How operations stop, wait, or switch to a safe alternative

    A time-dependent safety argument needs behavior for loss of its assumptions. Continuing under an unjustified bound can violate the property the protocol relies on.

  41. 41.A lease expires at an issuer-clock deadline. The holder's clock may run slowly, and no skew or drift bound is enforced. What cannot be inferred from the holder's local belief alone?

    Show answer and explanation
    1. That the lease has an issuer-defined deadline
    2. That the holder once obtained a lease
    3. That the issuer still considers the lease valid
    4. That the holder has a local clock reading

    Answer: That the issuer still considers the lease valid

    Local belief does not establish remote authority without the protocol's time assumptions. Use justified lease semantics and resource-side enforcement where required.

  42. 42.An expired worker resumes after a long pause and writes using an old fencing token. A newer token has already been accepted by storage. Where should rejection occur to protect the stored resource?

    Show answer and explanation
    1. At the resource's token-enforcing write boundary
    2. A guarantee the old worker voluntarily stops
    3. Only in a monitoring dashboard
    4. Only in the paused worker's local timer

    Answer: At the resource's token-enforcing write boundary

    The protected resource must enforce the ownership order or equivalent authority rule. A stale process's local state and timers cannot be the sole protection against its resumed writes.

  43. 43.A resource has recorded fencing token 18. A request arrives with token 17 under a strictly increasing ownership-token contract. What should it do?

    Show answer and explanation
    1. Accept it because the request arrived later.
    2. Reset its recorded token to 17.
    3. Reject the stale token.
    4. A guarantee token order is unrelated to ownership.

    Answer: Reject the stale token.

    The token's defined order represents authority generations. An older holder must not overwrite a newer generation's protected state.

  44. 44.A fencing token counter is restored from backup to 10 after storage has already accepted token 20. What must recovery establish?

    Show answer and explanation
    1. A generation greater than the surviving accepted authority
    2. Only a fresh process ID with no resource check
    3. Only that the restored counter is positive
    4. A guarantee a restarted coordinator can reuse any old token

    Answer: A generation greater than the surviving accepted authority

    Recovery must respect authority already recorded by surviving resources. Reusing old generations can block legitimate new work or undermine a poorly designed ownership protocol.

  45. 45.A service uses random unique request IDs as fencing tokens and compares their lexicographic order to decide newer ownership. What is missing?

    Show answer and explanation
    1. Only consistent string encoding
    2. A justified monotonic authority order
    3. Only probabilistic uniqueness
    4. A guarantee uniqueness implies chronological or authority order

    Answer: A justified monotonic authority order

    Uniqueness and ordering are separate properties. A random identifier need not represent which lease or ownership generation supersedes another.

  46. 46.A hybrid timestamp is represented as (physical-like part,logical part) and compared lexicographically. What role can the logical part serve when several events share the same physical part?

    Show answer and explanation
    1. Encode every participant's causal history fully.
    2. Eliminate the need for a message-delivery protocol.
    3. Order those events without requiring physical time to advance.
    4. Prove exact wall-clock equality on every machine.

    Answer: Order those events without requiring physical time to advance.

    A logical component can preserve ordering when the physical-like component does not advance. It does not by itself provide vector-style concurrency detection or dissemination.

  47. 47.A hypothetical hybrid clock local rule uses (p,0) if wall time p exceeds stored physical part l; otherwise it keeps l and increments c. Stored state is (100,4) and p=99. What next state results?

    Show answer and explanation
    1. (100,5)
    2. (101,0)
    3. (99,0)
    4. (100,4)

    Answer: (100,5)

    The wall time does not exceed l, so the supplied rule retains 100 and increments the logical component from 4 to 5. The example explicitly defines its update semantics.

  48. 48.Under that explicitly defined local rule, stored state is (100,4) and wall time is 103. What next state results?

    Show answer and explanation
    1. (103,5)
    2. (104,0)
    3. (100,5)
    4. (103,0)

    Answer: (103,0)

    Because 103>100, the rule adopts the newer physical part and resets the logical part to zero. Other algorithms may require additional receive rules.

  49. 49.A scalar hybrid clock preserves causal timestamp order under its assumptions. Does a smaller hybrid timestamp alone prove that a causal path exists?

    Show answer and explanation
    1. Yes; every ordered pair is causally related.
    2. Yes; all hosts share one process history.
    3. Only equal timestamps can represent events.
    4. No; scalar order is not a complete concurrency test.

    Answer: No; scalar order is not a complete concurrency test.

    Like other scalar logical orderings, increasing timestamps can order concurrent events. Causal implication does not generally become an equivalence merely by adding a physical-like component.

  50. 50.A clock message carrying a far-future physical value makes a receiver's logical physical-like part jump forward. What operational issue should a design address?

    Show answer and explanation
    1. Only the timestamp's display time zone
    2. A guarantee all received clock metadata is trustworthy
    3. Only whether the message has a long payload
    4. Validation and handling of excessive remote clock skew

    Answer: Validation and handling of excessive remote clock skew

    Clock metadata can affect ordering, expiry, and availability. Define trust, skew limits, and recovery behavior appropriate to the protocol rather than accept arbitrary time claims blindly.

  51. 51.A logical counter stored in eight bits wraps from 255 to 0, and timestamps are compared as ordinary unsigned integers. What property can fail?

    Show answer and explanation
    1. Monotonic timestamp order
    2. Only the number of participant names
    3. Only the counter's storage size
    4. A guarantee every finite counter preserves unbounded order

    Answer: Monotonic timestamp order

    Wraparound needs a justified bounded-window, epoch, or other protocol rule. Ordinary comparison after wrap can label a later event as earlier.

  52. 52.A protocol uses modulo sequence numbers and treats a as newer than b only within a defined half-range window. What assumption must its use satisfy?

    Show answer and explanation
    1. Every delayed message may remain live forever.
    2. The live comparison distance stays within that window.
    3. A guarantee modular arithmetic gives an unambiguous total order for all ages.
    4. Counter width is irrelevant.

    Answer: The live comparison distance stays within that window.

    Modulo ordering is meaningful under bounded-distance and lifecycle conditions. Long delays or excessive outstanding ranges can make age comparisons ambiguous.

  53. 53.A sequence field wraps modulo 16. Under a supplied rule, forward distance from 14 to 1 is (1−14) mod 16. What is the distance?

    Show answer and explanation
    1. −13
    2. 3
    3. 15
    4. 13

    Answer: 3

    The modular difference is −13 mod 16=3. Interpreting it as 'newer' also needs the protocol's distance-window and lifecycle assumptions.

  54. 54.A broker guarantees order within each partition. A producer moves one entity's events between partitions without a handoff protocol. What order claim needs additional support?

    Show answer and explanation
    1. A single entity order across the move
    2. Each new partition's local order under its contract
    3. Each old partition's local order under its contract
    4. The fact that two partitions exist

    Answer: A single entity order across the move

    Per-partition order does not automatically compose into a cross-partition entity order. Define routing epochs, barriers, or another suitable handoff relation.

  55. 55.An event says 'delete version 5,' but it arrives after a new version 6 was created. What metadata helps avoid applying the deletion to an unintended newer object?

    Show answer and explanation
    1. Only the key's current text name
    2. Only arrival time at the replica
    3. A guarantee all deletes mean every future incarnation too
    4. The deletion's target version or generation

    Answer: The deletion's target version or generation

    Deletion semantics may be version-specific or otherwise defined. Carry and enforce the intended lifecycle context instead of assuming a delayed event targets a later incarnation.

  56. 56.Two events carry entity sequence numbers 40 and 42. The projection requires every transition and has applied through 40. What should it avoid?

    Show answer and explanation
    1. Reporting the projection's current position
    2. Detecting the missing sequence
    3. Treating 42 as proof that 41 was applied
    4. Buffering or recovering according to its contract

    Answer: Treating 42 as proof that 41 was applied

    A higher observed sequence identifies a gap under a contiguous-transition contract. It does not supply the missing event's content or effects.

  57. 57.A state-replacement stream allows newer complete snapshots to supersede older snapshots. Does a skipped snapshot necessarily violate that contract?

    Show answer and explanation
    1. No stream can ever detect missing records.
    2. No; the declared state-replacement semantics may permit it.
    3. Yes; sequence numbers require identical semantics everywhere.
    4. Yes; every stream must apply all intermediate events.

    Answer: No; the declared state-replacement semantics may permit it.

    State snapshots and incremental transitions have different obligations. Whether skipping is legal depends on the actual content and consistency contract.

  58. 58.A stream checkpoint stores 'received through 100,' but output effects are durable only through 95. What should recovery distinguish?

    Show answer and explanation
    1. Only the consumer's host name
    2. Only the largest number in the record
    3. A guarantee receipt implies completed effects
    4. Receipt position from applied durable position

    Answer: Receipt position from applied durable position

    Different lifecycle positions represent different evidence. Restarting after the receipt checkpoint can skip unapplied work unless the recovery protocol retains or replays it correctly.

  59. 59.A request passes through services A, B, and C. C retries its side effect after losing a reply. What identity is useful for tracing all attempts of the same logical operation?

    Show answer and explanation
    1. A logical-operation identity plus distinct attempt identities
    2. A guarantee retry attempts are separate user intentions
    3. Only each host's wall-clock timestamp
    4. Only a fresh unrelated request ID per log line

    Answer: A logical-operation identity plus distinct attempt identities

    Linking logical work and individual attempts supports diagnosis without conflating duplicate delivery with distinct operations. Identity still needs enforcement for effect uniqueness.

  60. 60.A trace has a 10 ms child span beginning before its parent span's recorded start on another host. What should investigation check before claiming impossible causality?

    Show answer and explanation
    1. Clock offsets and instrumentation semantics
    2. A guarantee timestamps from different machines share exact time
    3. Only the child's displayed service name
    4. Only the number of trace attributes

    Answer: Clock offsets and instrumentation semantics

    Cross-host timing can appear inverted because of clock error or span boundaries. Correlate actual request relationships and clock assumptions before inferring a violation.

  61. 61.A trace API records queue insertion as the parent event but omits the dequeue-to-worker relation. What causality information can be missing?

    Show answer and explanation
    1. Only the queue's maximum capacity
    2. Only the log line's text length
    3. The asynchronous handoff edge
    4. A guarantee one trace ID determines every event edge

    Answer: The asynchronous handoff edge

    An identifier groups records but does not necessarily specify dependencies. Record the appropriate link or parent relation for asynchronous handoffs and fan-out.

  62. 62.Two parallel child tasks share one parent but do not communicate. What order does the parent relation alone establish between the children?

    Show answer and explanation
    1. The first collected child span caused the other
    2. No causal order between the children
    3. Both children are the same event
    4. The shorter child necessarily precedes the longer one

    Answer: No causal order between the children

    A common predecessor does not order independent successors. Keep the relation as a partial order unless other events supply a dependency.

  63. 63.A fan-in step requires outputs from tasks X and Y. It begins after X but before Y completes. What requirement should a causal workflow checker enforce?

    Show answer and explanation
    1. A guarantee one predecessor implies all siblings finished
    2. Both required predecessors complete before fan-in consumption
    3. Only the fan-in's final timestamp
    4. Only the earliest predecessor's completion

    Answer: Both required predecessors complete before fan-in consumption

    A join's dependency set contains both outputs under the stated workflow. Check the actual availability and consumption relation rather than one arbitrary predecessor.

  64. 64.A workflow intentionally permits speculative work before dependencies complete but forbids committing it until validation. What event should the correctness order constrain?

    Show answer and explanation
    1. A guarantee speculation makes dependency rules irrelevant
    2. Every speculative instruction unconditionally
    3. The specified validation and commit boundary
    4. Only task creation time

    Answer: The specified validation and commit boundary

    Speculative execution and visible commitment are different. Verify the contract at the point where effects become externally accepted, including invalidation behavior.

  65. 65.A causal log checker sees a receive whose matching send is absent. What should it distinguish?

    Show answer and explanation
    1. Incomplete instrumentation from an actual protocol violation
    2. A guarantee an absent log record proves no send occurred
    3. Only the receive's payload length
    4. Only whether timestamps sort correctly

    Answer: Incomplete instrumentation from an actual protocol violation

    A trace can be incomplete. Assess collection coverage, loss, identity, and event definitions before interpreting a missing record as impossible execution.

  66. 66.Two hosts label events with local counters but omit host identity. Both produce event 7. What ambiguity results?

    Show answer and explanation
    1. Only one event can exist.
    2. A guarantee local counters are globally unique.
    3. Both events must have equal causal history.
    4. The event identifiers collide.

    Answer: The event identifiers collide.

    A local counter needs its namespace and lifecycle context for global identification. Otherwise unrelated events can be falsely merged or matched.

  67. 67.A process counter is persisted asynchronously and reused after a crash, producing duplicate event identities. What should identity generation address?

    Show answer and explanation
    1. Only a longer log message
    2. A guarantee counters never repeat after restart.
    3. Only the precrash process's uptime
    4. Crash-safe uniqueness across lifetimes

    Answer: Crash-safe uniqueness across lifetimes

    Persistence timing and restart identity affect uniqueness. Use an appropriate durable reservation, epoch, or other justified scheme for the required lifecycle.

  68. 68.A report sorts all events into one timeline and draws arrows between adjacent rows. What unsupported inference can that display introduce?

    Show answer and explanation
    1. A guarantee every total order is a dependency graph
    2. Only the number of visible events
    3. Only the fact that rows can be sorted
    4. Causal edges where only display order exists

    Answer: Causal edges where only display order exists

    A visualization's chosen total order need not represent causal dependence. Distinguish known edges from an arbitrary tie-break or physical-time estimate.

  69. 69.A global snapshot cut includes a message receive but excludes its matching send. Under causal consistency of cuts, what is wrong?

    Show answer and explanation
    1. Only the cut's row count matters.
    2. Every cut must include every event ever.
    3. The cut omits a causal predecessor of an included event.
    4. The send must physically happen after the receive.

    Answer: The cut omits a causal predecessor of an included event.

    A consistent cut is closed under the relevant causal predecessors. Including a receive requires its send in that event set.

  70. 70.A cut includes a send but not its later matching receive. Can this be a consistent cut under the stated causal model?

    Show answer and explanation
    1. Yes; the message can be in flight at the cut.
    2. No; all processes must have identical local event counts.
    3. No; send and receive must always enter every cut together.
    4. Only empty cuts can be consistent.

    Answer: Yes; the message can be in flight at the cut.

    A consistent cut may contain an in-flight message. It must not contain an effect without its predecessor, but it may stop before the effect occurs.

  71. 71.P has p1→p2, Q has q1→q2, and p2 sends a message received at q2. Which set is closed under these predecessor edges?

    Show answer and explanation
    1. {p1,q1,q2}
    2. {p2,q2}
    3. {q2}
    4. {p1,p2,q1,q2}

    Answer: {p1,p2,q1,q2}

    The full listed set includes both local predecessors and the message send. Each other option includes an event while omitting at least one required predecessor.

  72. 72.A snapshot takes P before it sends a message and Q after receiving that same message. What inconsistency can result?

    Show answer and explanation
    1. Only a larger backup file
    2. A guarantee all independently timed copies form a consistent cut
    3. Only a harmless difference in local row counts
    4. An included effect with its cause outside the snapshot

    Answer: An included effect with its cause outside the snapshot

    Independent local snapshots can select incompatible causal positions. A global snapshot protocol or suitable version relation is needed for the intended coherent state.

  73. 73.A snapshot includes a payment debit but excludes a causally earlier credit that funded it. What property should its construction preserve?

    Show answer and explanation
    1. Closure over the relevant dependencies
    2. Only equal table sizes
    3. Only matching backup timestamps as strings
    4. A guarantee every copied row is independent

    Answer: Closure over the relevant dependencies

    A coherent state claim needs the relevant cross-record relationships, not just individually valid rows. Use an appropriate consistent-cut or transactional snapshot mechanism.

  74. 74.A system labels snapshots with a scalar timestamp but does not wait for or otherwise handle missing earlier writes. What does the label alone fail to establish?

    Show answer and explanation
    1. The possibility of storing immutable records
    2. The existence of a timestamp field
    3. The ability to compare two scalar labels
    4. Completeness of the visible state through that timestamp

    Answer: Completeness of the visible state through that timestamp

    A timestamp is metadata, not proof all applicable effects have arrived and been applied. Snapshot visibility needs an actual protocol and its assumptions.

  75. 75.A replica has applied updates with timestamps 10 and 20 but has not received update 15. What must a safe-time claim avoid?

    Show answer and explanation
    1. Stating that 20 is the maximum currently seen value
    2. Treating maximum seen timestamp 20 as proof of complete history through 20
    3. Recording the two applied updates
    4. Detecting the missing update when its identity becomes known

    Answer: Treating maximum seen timestamp 20 as proof of complete history through 20

    Maximum observed time is not necessarily a completeness frontier. A safe frontier requires evidence about missing or still-in-flight work under the protocol.

  76. 76.A stream watermark promises no future event with event time at or below W. W is 100 under that explicit contract. What does accepting an event at time 90 later require?

    Show answer and explanation
    1. A guarantee time 90 is greater than 100
    2. A defined violation or late-event policy
    3. A rule silently treating the old promise as satisfied
    4. Only a larger processing timestamp

    Answer: A defined violation or late-event policy

    Watermark semantics must be explicit. If the promise is strict, the late event conflicts with it; systems with heuristic watermarks need a documented late-data policy instead.

  77. 77.Event time is when a source says an action occurred; processing time is when a worker handles it. A delayed event arrives today with yesterday's event time. Which value determines its window under an event-time contract?

    Show answer and explanation
    1. Always today's processing timestamp
    2. Its defined event timestamp
    3. A guarantee both timestamps are equal
    4. Whichever value yields a fuller window

    Answer: Its defined event timestamp

    Window assignment follows the declared time semantics. Late arrival needs explicit handling but does not automatically change the event-time value.

  78. 78.A producer clock jumps forward and emits one event far in the future. A consumer advances its watermark to the largest seen event time with no other rule. What can be harmed?

    Show answer and explanation
    1. Treatment of subsequent ordinary-time events
    2. Only the future event's string formatting
    3. A guarantee maximum event time is always a valid completeness promise
    4. Only the consumer's process ID

    Answer: Treatment of subsequent ordinary-time events

    A faulty or skewed timestamp can advance an unjustified frontier and misclassify later arrivals. Validate timestamp assumptions and use a watermark protocol appropriate to actual lateness and source behavior.

  79. 79.A source uses milliseconds while a receiver interprets the same integer as seconds. What protocol detail must be explicit?

    Show answer and explanation
    1. A guarantee numeric timestamps are self-describing
    2. Only the event's display label
    3. Only the integer's decimal digits
    4. Units and epoch

    Answer: Units and epoch

    A timestamp value needs its scale, origin, and relevant time-system semantics. Encoding without those conventions can create enormous ordering and expiry errors.

  80. 80.A duration of 2.5 seconds is encoded as integer milliseconds. What integer should be transmitted under that rule?

    Show answer and explanation
    1. 25
    2. 2500
    3. 250
    4. 2

    Answer: 2500

    There are 1,000 milliseconds per second, so 2.5×1,000=2,500. The question specifies integer milliseconds rather than an implementation-dependent timestamp format.

  81. 81.A cache uses a remote producer timestamp to expire entries after five seconds but has no clock-offset bound. What should the design address?

    Show answer and explanation
    1. Only whether timestamps sort lexicographically
    2. Only the cache key's length
    3. The age calculation's clock assumptions
    4. A guarantee remote timestamp subtraction yields true age

    Answer: The age calculation's clock assumptions

    Cross-machine age estimation requires a justified time relation or another freshness protocol. Local insertion age measures something different from time since remote creation.

  82. 82.A record is created at true time 100, received at true time 130, and cached for 20 seconds after receipt. At expiry, how old is it since creation under these exact times?

    Show answer and explanation
    1. 20 seconds
    2. 150 seconds
    3. 50 seconds
    4. 30 seconds

    Answer: 50 seconds

    Expiry occurs at 130+20=150. Its age since creation is 150−100=50 seconds, illustrating why insertion TTL and source freshness are different.

  83. 83.A trace changes only wall-clock offset while preserving local operation order and message deliveries. What property should a purely causal graph reconstruction retain?

    Show answer and explanation
    1. A guarantee wall-clock shifts change every message dependency
    2. The same displayed wall timestamps necessarily
    3. The same inferred exact physical durations necessarily
    4. The same happened-before edges

    Answer: The same happened-before edges

    Causality from process order and matching messages does not depend on an arbitrary wall-clock offset. Physical-time claims need separate assumptions.

  84. 84.A test reorders two causally independent events. The operations commute under the specified state machine. What result should a metamorphic check compare?

    Show answer and explanation
    1. Equivalent final state under the defined commutation contract
    2. A requirement that all unrelated events share one timestamp
    3. A guarantee arbitrary noncommuting operations can be swapped
    4. Identical intermediate logs in every order

    Answer: Equivalent final state under the defined commutation contract

    A valid metamorphic relation needs both independence and the task's semantic commutation condition. Do not assume all concurrent operations commute.

  85. 85.Two concurrent operations set the same register to different values. What must a convergence design specify?

    Show answer and explanation
    1. How conflicting updates are resolved or preserved
    2. Only the number of clients
    3. A guarantee concurrency implies the operations commute
    4. Only a smaller wall-clock unit

    Answer: How conflicting updates are resolved or preserved

    Concurrent writes can conflict. Causal metadata identifies relationships but does not by itself choose the application's merge or conflict policy.

  86. 86.A vector clock marks two edits concurrent. One edit is a prerequisite correction for the other in the user's real workflow, but the system did not record that communication. What is the model's limitation?

    Show answer and explanation
    1. Only physical simultaneity matters.
    2. It lacks a relevant dependency edge.
    3. The vector calculation proves the user workflow never existed.
    4. A guarantee all real dependencies are automatically observable.

    Answer: It lacks a relevant dependency edge.

    Causal inference is relative to the observed event model and propagated context. Untracked communication can carry dependencies that the recorded graph omits.

  87. 87.A user reads a value in one application and manually copies it into another, whose request has no causal context. What should a cross-application guarantee account for?

    Show answer and explanation
    1. The external information channel
    2. Only the second request's byte count
    3. Only the first application's server name
    4. A guarantee no network trace means no dependency

    Answer: The external information channel

    Real workflows can cross channels outside the instrumented system. Define the causal scope and any context propagation needed for the promised behavior.

  88. 88.A service attaches the entire user's session context to every unrelated request. What tradeoff should causal-metadata design consider?

    Show answer and explanation
    1. Only the largest timestamp's number of digits
    2. Correct dependencies versus unnecessary coupling and metadata cost
    3. Only the context's display ordering
    4. A guarantee more dependencies are always free

    Answer: Correct dependencies versus unnecessary coupling and metadata cost

    Conservative context can force extra waiting and overhead. Preserve required dependencies while assessing propagation scope, privacy, and cost under the intended consistency contract.

  89. 89.A replica refuses to expose an update until all declared dependencies arrive. One dependency is permanently unavailable. What must the API's behavior specify?

    Show answer and explanation
    1. A guarantee consistency alone ensures availability
    2. A rule pretending the missing dependency was applied
    3. Only the update's display title
    4. The waiting, failure, or fallback policy under that condition

    Answer: The waiting, failure, or fallback policy under that condition

    A visibility rule can block progress when required information is missing. State timeout, routing, rejection, or other fallback semantics consistent with the promised guarantee.

  90. 90.A client requires causal visibility but permits returning an explicit unavailable response. During a partition, what can be a valid result?

    Show answer and explanation
    1. Claiming a timeout proves no data exists
    2. A guarantee every request must return fresh data despite the partition
    3. Rejecting or waiting according to the declared contract
    4. Returning a dependent value while hiding its prerequisite as if consistent

    Answer: Rejecting or waiting according to the declared contract

    A guarantee can preserve its safety condition by declining to serve when it cannot establish the required state. Availability and error behavior must be part of the contract.

  91. 91.A service gives every event a globally unique ID but no ordering metadata. Which claim does uniqueness alone fail to establish?

    Show answer and explanation
    1. Distinct identity under the stated scheme
    2. Causal or real-time ordering of the events
    3. The possibility of detecting duplicate delivery of that same ID
    4. The ability to correlate an event by its ID

    Answer: Causal or real-time ordering of the events

    Identity can distinguish events without describing their relationships. An ordering guarantee needs additional semantics and enforcement.

  92. 92.A timestamp tuple uses physical-like time plus process ID but omits a local sequence. Two events at one process occur in the same time unit. What identity risk remains?

    Show answer and explanation
    1. A guarantee process IDs order every local event
    2. Only a cross-time-zone display issue
    3. Duplicate tuples at that process
    4. A guarantee both events are the same operation

    Answer: Duplicate tuples at that process

    A coarse time field and fixed process ID may not distinguish multiple local events within one tick. Add an appropriate sequence or other uniqueness mechanism if required.

  93. 93.A receiver stores only the last arrival time and overwrites a newer entity state with a delayed older update. What information could prevent regression under a versioned-state contract?

    Show answer and explanation
    1. A guarantee last arrival is always latest state
    2. Only the local arrival timestamp
    3. The update's authoritative version relation
    4. Only a larger receive buffer

    Answer: The update's authoritative version relation

    Arrival order can differ from source version order. Compare the appropriate version, epoch, or dependency metadata and apply the declared conflict policy.

  94. 94.A deletion and recreation share the same key string but belong to different object generations. What must a delayed operation identify to target the intended object?

    Show answer and explanation
    1. Only the current key string
    2. The object generation as well as the key
    3. Only the delayed operation's arrival time
    4. A guarantee a reused name preserves object identity forever

    Answer: The object generation as well as the key

    A name can be reused across lifetimes. Generation-aware identity prevents a delayed operation from accidentally acting on a new incarnation.

  95. 95.A test claims linearizability by sorting responses according to their wall-clock end times and checking that order only. What search requirement is missing?

    Show answer and explanation
    1. Only a more precise timestamp printer
    2. A guarantee end-time sorting is the definition of linearizability
    3. A rule forcing every concurrent operation into end-time order
    4. Consideration of legal linearizations consistent with real-time constraints

    Answer: Consideration of legal linearizations consistent with real-time constraints

    Concurrent operations may admit different legal linearization orders. A checker must assess the specified history constraints and state-machine behavior, not one unjustified fixed order.

  96. 96.Two operations overlap in time and the object contract permits either sequential order. What should a history checker avoid?

    Show answer and explanation
    1. Using the specified sequential object model
    2. Respecting a completed-before-started constraint when it exists
    3. Checking both legal order candidates as needed
    4. Rejecting solely because one arbitrary chosen order fails

    Answer: Rejecting solely because one arbitrary chosen order fails

    A particular order's failure does not show no valid order exists. Search or otherwise reason over the allowed candidate histories while preserving all required constraints.

  97. 97.A write completes before a later read begins, and no intervening write occurs. What relation distinguishes linearizability from a sequential ordering that ignores real time?

    Show answer and explanation
    1. A guarantee every overlapping operation has one predetermined order
    2. Only process IDs determine order.
    3. The read must be ordered after that completed write.
    4. The read may always be placed before the write.

    Answer: The read must be ordered after that completed write.

    Linearizability preserves real-time precedence of nonoverlapping operations. Concurrent overlaps still need a legal order consistent with the object's semantics.

  98. 98.A local monotonic timer resets on machine reboot. A persisted deadline stores its old raw timer value and is reused after reboot. What needs a lifecycle-aware design?

    Show answer and explanation
    1. Only the integer's printed radix
    2. Only a larger timeout constant
    3. Interpretation of the persisted deadline across clock epochs
    4. A guarantee monotonic values survive all restarts comparably

    Answer: Interpretation of the persisted deadline across clock epochs

    A local timer's origin can be lifetime-specific. Persisted expiry and recovery need a suitable time representation or epoch-aware policy rather than compare unrelated raw values.

  99. 99.A distributed test injects clock steps, process pauses, delayed messages, and restarts separately. What additional evidence can uncover interactions?

    Show answer and explanation
    1. Only the total number of test names
    2. Relevant combinations with explicit model assumptions
    3. A guarantee isolated success implies combined success
    4. Only more repeats of one isolated fault

    Answer: Relevant combinations with explicit model assumptions

    Time, message delay, and lifecycle changes can interact. Test justified combined scenarios while retaining a clear fault and timing model.

  100. 100.An ordering proof assumes authenticated, unmodified messages, but deployment allows an untrusted peer to forge clock metadata. What should the system argument revisit?

    Show answer and explanation
    1. The trust model and metadata validation
    2. Only a higher logical-counter starting value
    3. A guarantee a correct clock algorithm validates all inputs automatically
    4. Only the timestamp field's size

    Answer: The trust model and metadata validation

    Algorithm guarantees rely on their failure and trust model. Forged metadata may violate those assumptions and affect ordering, resource use, or availability.

  101. 101.A candidate is asked to choose a timestamp design. Which response is strongest?

    Show answer and explanation
    1. Start from required identity, causality, real-time, lifecycle, and failure semantics.
    2. Choose the largest integer field and promise every consistency property.
    3. Treat a deterministic sort as a complete replication protocol.
    4. Assume wall clocks are exact on all hosts.

    Answer: Start from required identity, causality, real-time, lifecycle, and failure semantics.

    Different metadata and protocols provide different relations. Choose and verify the mechanism against the actual contract and operating assumptions rather than infer guarantees from a timestamp label.