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
      • The Answer Framework
      • Drawing a Transaction
      • Explaining a Race
      • Grading Rubric
    • Staff-Level Design Reviews
    • Program Risk and Escalation Playbooks
    • Coherency Interview Q&A Bank
  • Capstone: A Coherent Model Lab5
Loading lesson

‹Whiteboard Frameworks for Coherency
  1. Topics
  2. Cache Coherency
  3. Interview and Design Review
  4. Whiteboard Frameworks for Coherency
  5. Grading Rubric

Part 13 · Interview and Design Review · All levels

Grading Rubric

A 0 to 4 rubric for coherence answers, what each level sounds like, a self-assessment exercise and a runnable scorer.

On this page

    How do you know your answer is good enough?

    By grading it against levels that are defined by what the answer contains, not how confident it sounds. The rubric below is the one this Part's question bank uses. Each level adds one kind of content from the answer framework; none can be reached by more vocabulary alone. On this scale the weak answer in that lesson is a 1 and the strong answer is a 4.

    Level

    Contains

    What it sounds like (two cores write X at once)

    0

    Wrong or vague: a claim that breaks an invariant, or no mechanism at all

    "Both writes go through and the caches merge them." (Two writers at once.)

    1

    Vocabulary only: correct terms, no mechanism

    "MESI invalidates the other copy, so it's coherent."

    2

    Correct mechanism: who serializes, which states, who supplies data

    "H accepts C0's GetM first, queues C1's, invalidates C1, grants C0. Then forwards to C0, and C1 gets Data(1) with M."

    3

    Mechanism plus a trade-off and one edge case handled explicitly (a race when the question involves concurrency; otherwise a boundary case such as E beside I, a silent E store, or legally stale memory)

    Adds: "C1 gets the Inv while in SM^D, so it needs data, not permission. Queueing at H costs a slot; NACK and retry needs a fairness rule."

    4

    Level 3 plus stated assumptions and evidence

    Adds: "Assuming MSI, directory, no FIFO, acks at H, both in S. I'd assert SWMR, check the value order 1 then 2 in a scoreboard, and cover Inv in SM^D."

    Two rules keep the rubric honest. First, an error caps the score at 0: an answer that lets two caches write at once has not understood the question, however much else it says. Second, level 4 needs both assumptions and evidence: a perfect mechanism with no stated model cannot be checked against the system the interviewer meant, and an answer with no evidence cannot be checked at all.

    Outline your answer, then score the outline

    Before speaking, jot the points you will make and tag each with its framework part. The scorer below turns that outline into a score with the rules above. Mechanism needs both who serializes and who supplies data; an assumption point needs the protocol plus at least one of home, ordering or delivery. The edge-case point may be tagged race or edge: the scorer accepts either.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    import itertools
    
    def score(outline):
        """outline: list of (tag, text). Returns 0 to 4."""
        tags = [t for t, _ in outline]
        if not outline or "error" in tags:
            return 0
        mechanism = {"mech:serialize", "mech:data"} <= set(tags)
        if not mechanism:
            return 1 if "vocab" in tags or any(t.startswith("mech:") for t in tags) else 0
        if not ("tradeoff" in tags and ("race" in tags or "edge" in tags)):
            return 2
        assumptions = {t for t in tags if t.startswith("assume:")}
        if "assume:protocol" in assumptions and len(assumptions) >= 2 and "evidence" in tags:
            return 4
        return 3
    
    def score_broken(outline):
        """Variant that forgets the assumption requirement for level 4."""
        tags = [t for t, _ in outline]
        s = score(outline)
        return 4 if s == 3 and "evidence" in tags else s
    
    strong = [
        ("assume:protocol", "MSI, directory at H"),
        ("assume:ordering", "no FIFO, acks at H, both start in S / 0"),
        ("mech:serialize", "H accepts C0 GetM first, C1 GetM queued"),
        ("mech:data", "C1 invalidated in SM^D, later gets Data(1) with M via Fwd-GetM"),
        ("race", "Inv reaches C1 while its own GetM is pending"),
        ("tradeoff", "queue slot at H versus NACK and retry with fairness"),
        ("evidence", "SWMR assertion, scoreboard value order 1 then 2, cover Inv in SM^D"),
    ]
    vocab_only = [("vocab", "MESI"), ("vocab", "invalidation"), ("vocab", "coherent")]
    no_assumptions = [p for p in strong if not p[0].startswith("assume:")]
    wrong = strong + [("error", "both caches hold M and merge the writes")]
    
    assert score(strong) == 4
    assert score(vocab_only) == 1
    assert score(no_assumptions) == 3          # mechanism without a model cannot reach 4
    assert score(wrong) == 0                   # an invariant-breaking claim caps the score
    edge_not_race = [p for p in strong if p[0] != "race"] + [("edge", "C1 in E beside C0 in I: silent E-to-M store, no message")]
    assert score(edge_not_race) == 4           # a boundary case counts as the edge case when no race applies
    
    # General claim: over every subset of the strong outline, a 4 requires assumptions and evidence,
    # and adding a point never lowers the score.
    for n in range(len(strong) + 1):
        for subset in itertools.combinations(strong, n):
            s = score(list(subset))
            tags = {t for t, _ in subset}
            if s == 4:
                assert "assume:protocol" in tags and "evidence" in tags
            for extra in strong:
                if extra not in subset:
                    assert score(list(subset) + [extra]) >= s
    
    # Failing case: the broken scorer gives a 4 to an outline with no assumptions.
    assert score_broken(no_assumptions) == 4
    print("PASS: strong outline scores 4, vocabulary scores 1, no assumptions cannot reach 4")

    The enumeration checks the rubric's structure, not one example: across all 128 subsets of the strong outline, a 4 always contains a protocol assumption and evidence, and adding a correct point never lowers the score. The broken scorer shows the failure the rule prevents: without the assumption requirement, a fluent mechanism with a test plan would be graded 4 while leaving the model unstated.

    Self-assessment exercise

    Grade each answer to "What happens when two cores write the same line at the same time?" before opening the check below. The answers are illustrative.

    1. "The cache coherence protocol serializes them. One gets M and the other is invalidated. That's what SWMR means."

    2. "Assuming MSI on a directory: H accepts C0's GetM first and queues C1's. C1 is invalidated while in SM^D, so when it is served it needs the data; H forwards to C0 and C1 gets Data(1) with M. Queueing costs a slot at H, retries would need fairness."

    3. "On a snooping bus, both caches arbitrate and the bus picks one. The winner's request is seen by the other, which invalidates. The loser then reissues its GetM and gets the line from the winner's cache, which has the newest value. I'd prove it with an assertion that at most one cache is in M."

    Check yourself Grade answers 1, 2 and 3, and say what each needs for the next level.

    Answer 1 scores 1: correct vocabulary, but no serialization point and no data source. It needs the mechanism (who orders, what the loser receives). Answer 2 scores 3: assumptions stated in part, full mechanism, one race (Inv in SM^D) and a trade-off, but no evidence. One sentence of checks (SWMR assertion, value order in a scoreboard, coverage of Inv in SM^D) makes it a 4. Answer 3 scores 2: the snooping mechanism is right in outline (the bus order is the serialization point, see Snooping on a Shared Bus) and it has evidence, but no trade-off and no race or edge case handled; its assumption is only implied by "on a snooping bus" and says nothing about the protocol. Evidence does not lift a score past a missing level.

    Common pitfall

    Grading yourself on fluency. Read your outline's tags: if there is no evidence tag, you are at most a 3, however good it sounded.

    Common pitfall

    Padding with every term you know to look like a 3. Vocabulary without a serialization point and a data source stays at 1.

    Interview

    If you sense you are at a 2, add the cheapest missing part first. A one-sentence assumption and a one-sentence check usually cost less time than a second race.

    Check yourself An answer has a perfect mechanism, two races, a trade-off and a test plan, but never names the protocol or the ordering. Why is it a 3, not a 4?

    Because the trace it describes is correct only under some model. Under acks at the requester, an ordered bus or a NACKing home, the messages and states differ. The interviewer cannot confirm the answer is right for their system, so the rubric withholds the top level until the assumptions are stated.

    Related topics

    • Shared course model

    • The framework the rubric grades

    • The trace behind the example

    • Why transient states exist

    • Pending entries behind the queue

    • Graded question bank

    Previous

    149 / 167

    Next: Staff-Level Design Reviews

    Up next

    Up nextStaff-Level Design Reviews

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • The Answer Framework
    • Drawing a Transaction