Skip to content

AMBA CHI · Module 19 · CHI Interview Mastery

Ownership Transfer Question

A common advanced question asks you to walk an ownership transfer of a dirty line between request nodes — a narration test. The scenario: RN0 holds a line dirty, as owner, and RN1 wants it. The sequence: RN1 issues a read-unique; the home sees RN0 owns it and snoops; RN0 forwards its dirty data with pass-dirty and invalidates; RN1 installs the line dirty as the new owner. The two points that make it strong: the data and the write-back obligation travel together — RN1 inherits the duty to write it back — and there is always exactly one owner. The trap is a two-owner window, or forgetting the write-back obligation moves with the data. Representative interview guidance, not the specification.

Advanced14 min readAMBA CHIInterviewOwnership TransferPassDirtySnoop

Module 19 · Chapter 19.5 · CHI Interview Mastery

Project thread — 19.4 explained the directory. 19.5 walks an ownership transfer; 19.6 walks a full ReadUnique.

1. The Question

"Walk me through how ownership of a dirty line transfers from one request node to another." — or: "Core A has a line dirty and core B wants it — what happens?" "Trace a cache-to-cache transfer of a modified line." It is a standard advanced question, and it is a narration test — the interviewer wants you to draw a sequence, hit the key invariants, and not fumble the hand-off.

2. What the Interviewer Is Probing

This question tests whether you can narrate a coherence flow correctly and spot the invariants that keep it safe. Specifically:

  • Can you produce a clean, ordered sequence — request, snoop, forward, invalidate, install?
  • Do you know the data and the write-back obligation travel together? — the core invariant.
  • Do you preserve exactly one owner — no two-owner or zero-owner window?
  • Do you know the data can go cache-to-cache (directly), not only through memory?

A candidate who narrates a smooth transfer and calls out "the dirty data and the duty to write it back move as a unit, and there's always exactly one owner" demonstrates real coherence understanding, not just message-name recall.

3. Key Terms

4. Where This Sits in the Interview

This is the fifth rung and the first flow question — it applies the roles (19.2–19.3) and the directory (19.4) to a concrete scenario. It is where the interviewer checks you can operate the machinery, not just describe it. A clean ownership-transfer narration earns you the harder flow (ReadUnique in 19.6) and the debugging question (19.9); a fumbled one suggests you know the parts but not how they move.

It draws directly on the ownership and dirty-data mechanics of Module 13 (pass-dirty, forwarding) and Chapter 9 (snoops), and it sets up 19.6 (a full end-to-end flow) and 19.9 (debugging a flow that broke — often a lost ownership transfer, Chapter 18.1). The invariants you name here — data-plus-obligation, one owner — are what those later questions test you against.

5. The Core Answer

The sequence, and the two invariants:

"Request node B asks the home for the line; the home sees from its directory that A owns it dirty, and snoops A; A forwards its dirty data straight to B with pass-dirty set, and invalidates its own copy; B installs the line dirty as the new owner — inheriting the write-back obligation. The data and the duty to write it back move together, and there's exactly one owner at every step."

The steps:

  • 1. B requests. Request node B issues a request for the line (e.g. ReadUnique for a writable copy).
  • 2. Home snoops the owner. The home looks up its directory, sees A owns the line dirty, and snoops A.
  • 3. A forwards, with pass-dirty. A sends its dirty data to B — cache-to-cache (direct) or via the home — with PassDirty set, so B knows it's the newest value.
  • 4. A invalidates. A drops its copy (to I), giving up ownership.
  • 5. B becomes the owner. B installs the line dirty and inherits the write-back obligation.

The synthesis:

In a dirty-line ownership transfer, B requests → home snoops the owner A → A forwards its dirty data (pass-dirty) → A invalidates → B installs dirty as the new owner. The two invariants that make it correct: the data and the write-back obligation travel together (B inherits the duty to write the value back), and there is exactly one owner at every instant — never two, never zero.

6. Structuring Your Answer

The template for narrating a flow:

  • 1. Set the scene. "A owns the line dirty; B wants it." One sentence.
  • 2. Narrate in order. Request → snoop → forward → invalidate → install. Five beats, in sequence.
  • 3. Call out the invariants as you go. "…A forwards with pass-dirty, so B knows it's the newest data and inherits the write-back duty…" and "…A invalidates before B is the sole owner, so there's exactly one owner."
  • 4. Note the cache-to-cache path. "The data can go directly A-to-B — it doesn't have to route through memory."

The point to carry:

Narrate in order and weave the invariants into the steps rather than tacking them on at the end. Saying "A forwards with pass-dirty so B inherits the write-back duty" at the forwarding step shows you understand why that step matters; listing invariants separately reads as memorized facts. The flow and its meaning should arrive together.

7. The Sequence to Draw

The ownership transfer to draw. Request node RN1 requests the line. The home node, seeing RN0 owns it dirty, snoops RN0. RN0 forwards its dirty data directly to RN1 with pass-dirty set and reports to the home that it has invalidated. RN1 installs the line dirty as the new owner, inheriting the write-back obligation. Exactly one owner throughout, and the data goes cache-to-cache.RN1 (requester)Home NodeRN0 (owner, dirty)ReadUnique (wantsthe line)SnpUnique (ownerdetected)CompData · PassDirty(forward)SnpResp · I(invalidated)
Figure 1 — the ownership transfer to draw. Request node RN1 requests the line; the home, seeing RN0 owns it dirty, snoops RN0; RN0 forwards its dirty data directly to RN1 with pass-dirty set and reports to the home that it has invalidated; RN1 installs the line dirty as the new owner, inheriting the write-back obligation. Exactly one owner throughout, and the data goes cache-to-cache.

Four messages, drawn on three lifelines: RN1 requests, the home snoops RN0, RN0 forwards dirty data to RN1 (pass-dirty) and tells the home it invalidated. RN1 is now the sole dirty owner. This is the picture to sketch on the whiteboard — the interviewer is often watching whether you draw it, and this four-message diagram is the complete answer.

8. The Two Invariants

The invariants that make the transfer correct — call these out explicitly.

InvariantWhat it meansWhy it matters
Data + obligation togetherB gets the dirty data and the write-back dutythe newest value always has someone responsible for it
Exactly one ownerone owner at every instantnever two (double write-back) or zero (lost value)
Cache-to-cache pathdata can go A → B directlyfast; no needless memory round-trip
Pass-dirty carriedthe forward is marked dirtyB installs dirty, not clean

The rule to carry: the two invariants are the difference between reciting steps and understanding coherence. Anyone can list "request, snoop, forward, invalidate." The candidate who says "the write-back obligation moves with the data, so exactly one node is always responsible for the newest value, and there's exactly one owner at every instant" shows they understand what the transfer is protecting — which is what the interviewer is really testing.

9. The Model Answer

A full, polished narration:

"Say RN0 owns the line dirty — it has the only up-to-date copy — and RN1 wants it, say for a write.

RN1 issues a ReadUnique to the home. The home looks up its directory, sees RN0 owns the line dirty, and snoops RN0.

RN0 forwards its dirty data straight to RN1 — cache-to-cache — with pass-dirty set, so RN1 knows this is the newest value. RN0 invalidates its own copy and tells the home it's done.

Now RN1 installs the line dirty as the new owner — and critically, it inherits the write-back obligation: the duty to eventually write that value back to memory moves with the data. So the two things that stay true throughout: the data and the write-back duty travel together, so the newest value always has exactly one node responsible for it; and there's exactly one owner at every instant — RN0 invalidates as RN1 takes over, so never two owners and never zero. And the data went directly RN0-to-RN1 — no memory round-trip."

That is the five-beat sequence, the two invariants woven in, the cache-to-cache note, and the pass-dirty detail — a complete, senior-level narration.

10. The Depth Ladder

Matching depth.

  • Junior signal. "RN0 sends the line to RN1 through the home." — the gist, but no pass-dirty, no invalidate, no ownership/obligation.
  • Mid signal. Adds the steps — "the home snoops RN0, RN0 sends the data and invalidates, RN1 gets it." Shows the sequence.
  • Senior signal. Adds the invariants — "the write-back obligation moves with the data, and there's exactly one owner at every instant." Shows what's being protected.
  • Staff signal. Adds the edge cases — "if it's a shared read instead of unique, RN0 keeps a shared-clean copy and the ownership downgrades rather than transfers; and the pass-dirty is what stops the value being lost if RN0 evicts." Shows nuance across transaction types.

The point to carry:

Climb by naming the invariants (obligation-with-data, one owner) and then the variants (shared vs unique, downgrade vs transfer). The step-by-step is mid-level; the invariants are senior; the transaction-type variations are staff. The single most senior thing to say is that the write-back obligation is conserved — it moves but is never created or destroyed.

11. Whiteboard Sketch

What to write as you talk — the ordered message list beside the diagram.

  • RN1 → HN: ReadUnique(X) — "B wants the line."
  • HN → RN0: SnpUnique(X) — "home snoops the owner (from the directory)."
  • RN0 → RN1: CompData(X), PassDirty=1 — "owner forwards dirty data, cache-to-cache."
  • RN0 → HN: SnpResp: I — "owner invalidated; home updates the directory to RN1."
  • Result: RN1 = owner (dirty), inherits write-back obligation; RN0 = I.

The rule to carry: write the four messages in order and annotate each with its meaning. The interviewer is watching whether you can produce the concrete message names (ReadUnique, SnpUnique, CompData/PassDirty, SnpResp) and narrate their purpose. The list plus the one-owner result is the whiteboard answer.

12. What a Strong Answer Includes

The rubric.

ElementStrong answer?Why
Ordered sequenceyesrequest → snoop → forward → invalidate → install
Pass-dirty on the forwardyesB installs dirty, not clean
Write-back obligation movesyesthe core invariant
Exactly one owneryesno two-owner/zero-owner window
Cache-to-cache pathyesfast; no memory round-trip
Shared vs unique variantbonusstaff-level nuance

The rule to carry: the write-back-obligation-moves-with-the-data invariant is the highest-value element. It is the one thing that separates "the data got copied over" from "ownership — data and responsibility — transferred atomically." Say it explicitly, at the moment RN1 installs the line.

13. Weak Answer vs Strong Answer

Same knowledge, two deliveries.

  • Weak: "RN0 has the line, RN1 asks for it, the home gets the data from RN0 and gives it to RN1. Now RN1 has it." — a data copy, no pass-dirty, no invalidate, no ownership/obligation, no one-owner invariant. Sounds like a plain read.
  • Strong: "RN1 ReadUniques the home; the home snoops the owner RN0; RN0 forwards its dirty data with pass-dirty and invalidates; RN1 installs dirty as the new owner, inheriting the write-back obligation — exactly one owner throughout, data going cache-to-cache." — the sequence, pass-dirty, invalidate, obligation, one-owner.

The difference is that the weak answer describes a data transfer; the strong answer describes an ownership transfer — data plus the responsibility to write it back, with the one-owner invariant protecting the newest value.

14. The Interview Trap

15. Common Mistakes

  • Obligation left behind. Assumption: just copy the data. Trap: lost ownership (18.1). Fix: the write-back duty moves with the data.
  • Two-owner window. Assumption: both hold it briefly. Trap: single-writer violation. Fix: RN0 invalidates as RN1 takes over.
  • No pass-dirty. Assumption: forward the data plainly. Trap: RN1 installs clean, loses dirty. Fix: pass-dirty set.
  • Through memory. Assumption: RN0 writes back, RN1 reads. Trap: slow; misses DCT. Fix: cache-to-cache forward.
  • No invalidate. Assumption: RN0 keeps the line. Trap: two owners. Fix: RN0 → I on a unique transfer.
  • Only the gist. Assumption: "data moves." Trap: no invariants. Fix: name one-owner and obligation-with-data.

16. Interview Checklist

  • Draw the sequence — RN1 requests, home snoops owner, owner forwards, owner invalidates.
  • Set pass-dirty on the forward — RN1 installs dirty.
  • State the write-back obligation moves with the data.
  • Preserve exactly one owner — RN0 invalidates as RN1 takes over.
  • Note the cache-to-cache path (no memory round-trip).
  • Mention the shared vs unique variant only if depth is wanted.

17. Key Takeaways

  • Ownership transfer: request → home snoops owner → owner forwards (pass-dirty) → owner invalidates → requester installs dirty.
  • The data and the write-back obligation travel together.
  • There is exactly one owner at every instant — never two, never zero.
  • The data can go cache-to-cache, not through memory.
  • Pass-dirty ensures the requester installs the line dirty.
  • Draw the four-message sequence; the guidance here is representative.

18. Quick Revision

Ownership transfer. (capsule answer.) "Say RN0 owns the line dirty and RN1 wants it. RN1 issues a ReadUnique to the home; the home looks up its directory, sees RN0 owns it dirty, and snoops RN0. RN0 forwards its dirty data straight to RN1 — cache-to-cache — with pass-dirty set, so RN1 knows it's the newest value, and RN0 invalidates its copy. RN1 installs the line dirty as the new owner and inherits the write-back obligation. Two things stay true throughout: the data and the write-back duty travel together, so the newest value always has exactly one node responsible for it; and there's exactly one owner at every instant — RN0 invalidates as RN1 takes over, never two owners, never zero. The data went directly RN0-to-RN1, no memory round-trip. (For a shared read instead of unique, RN0 keeps a shared-clean copy and ownership downgrades rather than transfers.)" Draw the four messages: ReadUnique → SnpUnique → CompData/PassDirty → SnpResp(I). The trap: moving the data but not the write-back obligation (lost ownership), or a two-owner window. Representative interview guidance; 19.6 walks a full ReadUnique flow.

Coming Next

Chapter 19.6 — ReadUnique Flow Question. Ownership transfer is one flow; ReadUnique end-to-end is the flow interviewers most love to trace. Chapter 19.6 covers the ReadUnique-flow question — narrating a complete exclusive read from request through directory lookup, snoops to all sharers, data return, and completion, and the sequence an interviewer expects you to draw for the canonical write path.