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
      • SWMR Precisely
      • The Data-Value Invariant
      • Invalidate Versus Update
      • What a Violation Looks Like
    • Line States and Transitions
    • Directory Versus Snoop Fundamentals
  • 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

‹States and Protocols
  1. Topics
  2. Cache Coherency
  3. States and Protocols
  4. Single-Writer, Multiple-Reader Invariant

Part 2 · States and Protocols · All levels

Single-Writer, Multiple-Reader Invariant

Separate permission safety from value preservation, then use both to explain invalidation and diagnose a broken grant.

  • 4topics
  • 4lessons

Coherence has two obligations: control who may access a line, and preserve the right value when permission changes hands. This topic makes those obligations concrete on the two-cache course model. You will classify permissions, track the value owed to the next reader, explain why invalidation must finish before a write grant, and find the first unsafe step in a short trace.

Lesson

After it you can...

SWMR Precisely

Distinguish one writable holder from a read epoch, including zero readers.

The Data-Value Invariant

Reject a wrong value even when every permission looks legal.

Invalidate Versus Update

Explain the acknowledgement boundary and compare two propagation policies.

What a Violation Looks Like

Locate the first unsafe grant before a stale load exposes it.

Suggested order: take the four lessons in order. Keep the course model open for state and message meanings. The examples use private write-back caches C0 and C1, home H with a directory and memory controller, and memory (participant M in the diagrams). X is one location inside a 64-byte line that starts uncached with X = 0 in memory; permissions cover the whole line.

Delivery and grant-delivery assumptions: see the course model.

Check yourself If both caches contain the same bits, have you proved coherence?

No. Two writable caches violate permission safety even with equal bits. Conversely, two read-only caches can agree on an obsolete value. Check both permissions and the value inherited from the preceding write epoch.

Related topics

  • Course Model

  • Glossary

PreviousNext: SWMR Precisely

Up next

Up nextSWMR Precisely

Sign in to save progress

Practice this lessonReport an error

See also

  • Line States and Transitions
  • Directory Versus Snoop Fundamentals