Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Path
  • Cache Coherency Glossary
  • The Shared Course Model
  • Cache Coherency Revision Sheet
  • Why Coherence Exists8
  • States and Protocols12
  • Transactions12
  • Races and Controller Design8
  • Progress and the Fabric16
  • Ordering and Synchronization12
  • Performance and Scalability12
  • Real Protocols12
  • SoC Integration12
  • Power, Clocking and Reliability12
  • Verification12
  • Debug and Bring-up12
  • Interview and Design Review17
    • Whiteboard Frameworks for Coherency
    • Staff-Level Design Reviews
      • Reviewing a Protocol Change
      • Design Review Checklist
      • Writing a Design Memo
      • Trade-Off Questions
    • Program Risk and Escalation Playbooks
    • Coherency Interview Q&A Bank
  • Capstone: A Coherent Model Lab5
Loading lesson

‹Staff-Level Design Reviews
  1. Topics
  2. Cache Coherency
  3. Interview and Design Review
  4. Staff-Level Design Reviews
  5. Trade-Off Questions

Part 13 · Interview and Design Review · All levels

Trade-Off Questions

Senior-level coherence trade-off questions with model answers in the course framework, each with the numbers or conditions that decide it and the lessons that teach it.

On this page

    How do you answer 'which is better?'

    Every senior trade-off question has the same shape: two designs that are both correct, and a workload or budget that decides between them. A strong answer names the deciding quantity, gives it a value or a condition, and says when the answer reverses. Use the answer framework: Assumption (the model and workload), Mechanism (what each design does), Trade-off (the deciding numbers), Evidence (what you would measure). Numbers below are illustrative and come from earlier lessons of this course, where they were computed.

    1. Snooping or a directory at N cores?

    Deciding quantity

    Snooping (broadcast)

    Directory

    Probe messages per miss

    N-1 probes and N-1 responses: 14 at N = 8

    2k for k recorded holders, plus a lookup at H: 4 at N = 8, k = 2

    Metadata per 64-byte line (full bit vector)

    None (each cache's state is the record)

    2 + N bits: 4 bits (0.78%) at N = 2, 66 bits (12.9%) at N = 64

    Cache-to-cache miss

    2 legs on an ordered bus

    3 legs: requester, H, holder

    Model answer: at small N with an ordered broadcast medium, snooping wins on latency and needs no metadata. As N grows, probe traffic grows as N-1 per miss while actual sharing degree k usually stays small, so a directory or snoop filter pays once 2(N-1) probe messages per miss exceed the probe bandwidth budget. There is no universal core count: compute 2(N-1) against 2k with the measured k. Taught in Choosing Snoop or Directory, The Cost of Broadcast, Full Bit-Vector Cost.

    2. Inclusive or non-inclusive LLC?

    Deciding quantity: r = total private capacity / LLC capacity. An inclusive LLC holds about the LLC size in unique lines; an exclusive one about LLC plus private capacity, so the relative gain is r. Two 256 KiB private caches over a 1 MiB LLC give r = 0.5: 1 MiB against 1.5 MiB. At r = 1/16 the gain is 6.25%. Model answer: with small r, inclusive costs little capacity and gives a free snoop filter (an LLC tag miss proves no private copy), at the price of back-invalidations and inclusion victims. With large r, non-inclusive or exclusive keeps the capacity but needs a separate snoop filter, and an exclusive LLC is filled by every private eviction, clean ones included. Taught in Policy Trade-Offs and Back-Invalidation.

    3. Three-hop or four-hop forwarding?

    Deciding condition: direct (three-hop) wins on the requester's critical path if and only if the delay of the holder-to-requester leg is less than holder-to-H plus H-to-requester. With equal legs that is 3 against 4, one leg saved. Model answer: three-hop shortens dirty misses, but H must learn the transfer finished (a completion message, off the requester's path) and the requester must handle a Fwd or Inv that arrives before its Data. It loses when the direct leg is congested (7 units against 2 + 2 in the course's check) or when every cache-to-cache data path is too costly to build. Taught in Three-Hop Versus Four-Hop and Racing Requests at the Home.

    4. Collect Inv-Acks at H or at the requester?

    Worked on the course model: C0 S / 0 and C1 S / 0, C0 upgrades. With acks at H the critical path is GetM, Inv, Inv-Ack, Data: four serial legs. With acks at the requester, H sends Data with an ack count while Inv goes to C1, and C1's Inv-Ack goes to C0: three legs. Both send 2 + 2k messages for k sharers. Model answer: acks at the requester save one leg on every upgrade or write miss with sharers, at the cost of a requester that counts acks that may arrive before the Data carrying the total (a signed counter, the Primer's IM^AD and SM^AD). Acks at H keep the requester simple and give one place that knows the transaction is complete. The deciding number is the fraction of writes that hit shared lines times one leg of latency. Taught in the course model, Ack Counting and Late Data and Multicast and Ack Collection.

    5. NACK or queue at the home?

    Deciding quantities: a queue that never refuses must hold every request that can be outstanding to one home, up to N cores times m MSHRs each (8 × 16 = 128 entries, illustrative). A NACK costs no reserved storage but two messages (request, NACK) per refused attempt, and needs a fairness rule. Model answer: queue when the worst case fits in area, because it gives natural order and no retry traffic. NACK when it does not, but reserve a slot or a retry token at NACK time, or serve oldest first, otherwise a request can be refused for ever (starvation) or two retriers can keep displacing each other (livelock). Many designs combine a small queue with NACK plus reservation. Taught in Retries, NACKs and Credits and Starvation Cases.

    The deciding numbers on one card

    Diagram
    # not-run: illustrative worked arithmetic, values from the linked lessons
    1. Snoop vs directory   probes per miss  2(N-1) = 14 at N=8     directory 2k = 4 at k=2
                            metadata         (2+N)/512: N=2 -> 0.78%, N=64 -> 12.9%
    2. LLC inclusion        r = private/LLC = 2 x 256 KiB / 1 MiB = 0.5
                            unique lines     inclusive 1 MiB, exclusive 1.5 MiB
    3. Three vs four hop    direct wins iff  d(C0->C1) < d(C0->H) + d(H->C1)
                            equal legs       3 < 4, congested 7 > 2 + 2
    4. Acks at H vs req.    serial legs      4 vs 3, messages 2 + 2k both
    5. NACK vs queue        never-refuse     N x m = 8 x 16 = 128 entries
                            NACK cost        2 messages per refused attempt

    Common pitfall

    Answering a trade-off with a preference ('directories scale better'). Without the deciding quantity and its value, the interviewer cannot tell whether you know when the other design wins.

    Interview

    End every trade-off answer with the reversal: 'this flips when ...'. Then name the measurement you would take to find out which side of it the design is on.

    Check yourself An interviewer says: 32 cores, each line is typically shared by 2 caches, the fabric has no ordered broadcast. Snooping or a directory?

    A directory or a snoop filter. Broadcast would send 31 probes and collect 31 responses per miss, 62 messages, against about 4 for two recorded holders, and without an ordered medium snooping would also need completion rules of its own. The cost to accept is the metadata: 34 bits per line for a full bit vector, about 6.6% of a 64-byte line, which is why limited-pointer or coarse entries are worth considering at this size.

    Related topics

    • Shared course model

    • The answer framework

    • Architecture Q&A

    • Part 8: Choosing a Protocol

    Previous

    153 / 167

    Next: Program Risk and Escalation Playbooks

    Up next

    Up nextProgram Risk and Escalation Playbooks

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Reviewing a Protocol Change
    • Design Review Checklist