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
    • Single-Writer, Multiple-Reader Invariant
    • Line States and Transitions
    • Directory Versus Snoop Fundamentals
      • Snooping on a Shared Bus
      • Directory, Home and Sharers
      • Choosing Snoop or Directory
      • Hybrids and Snoop Filters
  • 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
  • Capstone: A Coherent Model Lab5
Loading lesson

‹Directory Versus Snoop Fundamentals
  1. Topics
  2. Cache Coherency
  3. States and Protocols
  4. Directory Versus Snoop Fundamentals
  5. Hybrids and Snoop Filters

Part 2 · States and Protocols · All levels

Hybrids and Snoop Filters

Use conservative holder metadata to avoid unnecessary snoops without dropping a real holder or dirty responsibility.

On this page

    When is it safe not to ask a cache?

    A snoop filter saves work by predicting which caches might hold a line. A positive result means 'possibly present', not 'definitely has the latest value'. A negative result can justify skipping a target only when the filter's maintained invariant proves absence. One common hybrid is a limited-pointer directory: each entry stores up to k sharer ids and falls back to broadcast once a line has more than k sharers. Both modes still need a defined completion rule.

    Keep the pilot to C0, C1, H and memory. Assume H broadcasts by default and keeps a filter F instead of a full directory; F is the only holder record. F is metadata at H, not a third cache or a new protocol message. X is one location in a 64-byte line and starts uncached with memory = 0. H still serializes conflicts for X, and filtering never bypasses required acknowledgement collection. Larger groups are an architectural extension, not additional participants in this example.

    A conservative candidate set

    Consider an independent idle snapshot: C0 is S / 0, C1 is I / -, and memory is 0. There is no writer. A safe filter must include every actual holder. The table checks four candidate F values against that rule. It shows no transaction or state transition.

    Actual holders of X

    Filter F

    Classification

    Safe discovery decision

    {C0}

    {C0}

    Exact

    Keep C0 as a possible target; C1 can be omitted

    {C0}

    {C0,C1}

    Conservative false positive for C1

    May check C1 unnecessarily; retain C0

    {C0}

    {C1}

    False negative for C0

    Unsafe to use for pruning: it hides a real reader

    {C0}

    Unknown

    No proof of absence

    Use a safe broader lookup; do not interpret unknown as empty

    Decision tree permits omitting C1 only with valid covering metadata that proves absence; all paths retain home serialization and completion rules.
    Filtering is a proof of absence. Neither an unknown entry nor a possible hit can justify skipping a required target.

    Now classify a different legal snapshot: C0 is M / 9, C1 is I / -, and memory is stale at 0. Omitting C0 would hide both write permission and the only newest copy. A filter miss for C0 cannot be repaired by falling back to memory: memory holds stale 0, so a reader would get the wrong value. The authority is F plus the caches: F must list C0 so that the request reaches it, and C0's own M state carries the dirty responsibility. This is a state classification, not a dirty-read sequence.

    Metadata lifecycle is part of correctness

    A conservative set may waste work safely; an omitted real holder breaks correctness. Allocations, permission changes and filter replacement must preserve coverage. An inclusive filter guarantees that every cached copy has an entry. To evict an entry, H first back-invalidates the listed holders: Inv to a clean holder, or Fwd-GetM to a dirty holder so that its data reaches memory. H frees the entry only after every Inv-Ack has arrived, or the dirty data has arrived and H has written it to memory. The alternative is to mark the region unknown and broadcast for it. Simply dropping an entry is not a safe eviction policy.

    The Primer, second edition, chapter 8 discusses directory and broadcast combinations and limited directory organisations.

    Common pitfall

    Treating a filter miss caused by metadata replacement as proof that no cache holds X. Unknown and absent are different. A false positive needs a defined harmless response and completion path; it is only a performance cost when that path is correct.

    Interview

    State the invariant before the energy benefit: every real holder remains covered, or a safe fallback handles the uncertainty. Then explain allocation and replacement, including back-invalidation. 'It filters snoops' is incomplete without those lifecycle rules.

    Check yourself In the S / 0 snapshot, F = {C0,C1} includes an invalid C1. Is shrinking F to {C1} an acceptable approximation?

    No. The first set overapproximates the real holder set {C0}; checking C1 can waste work safely with defined completion. The second set omits C0, so an operation could fail to discover a real reader. Approximation is safe only in the conservative direction.

    Related topics

    • Holder tracking and completion in the course model

    • Choosing Snoop or Directory

    • Up: Directory Versus Snoop Fundamentals

    Previous

    25 / 167

    Next: Transactions

    Up next

    Up nextTransactions

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Snooping on a Shared Bus
    • Directory, Home and Sharers