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
      • MSI Protocol
      • MESI and the Exclusive State
      • MOESI and Dirty Sharing
      • Stable Versus Transient States
    • 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

‹Line States and Transitions
  1. Topics
  2. Cache Coherency
  3. States and Protocols
  4. Line States and Transitions
  5. MESI and the Exclusive State

Part 2 · States and Protocols · All levels

MESI and the Exclusive State

Distinguish a clean exclusive cache state from the directory's exclusive holder record and follow a notified PutE eviction.

On this page

    If C0 reads an uncached line and is its only holder, why make it request permission again before its first store? MESI adds E: exclusive writable permission while the line is still clean. Prerequisite: MSI Protocol. The S, M and I meanings remain the same; E is not a stronger form of M. It distinguishes cleanliness while keeping exclusive permission. E (MESI, MOESI) appears in both larger protocols.

    The official gem5 MESI Two Level overview documents the optimisation of returning exclusive permission for a lone reader. Its hierarchy differs from our single-home teaching model; use its E definition, not its controller messages, for this lesson.

    Which property changed?

    State at C0

    Other usable cached copies

    Local store?

    Memory

    Eviction in the course model

    S

    May exist; even a lone S is read-only

    Needs exclusive permission first

    Current in settled MESI

    PutS, wait for Put-Ack

    E

    None

    Yes, silently change to M

    Current before that store

    PutE (no data), wait for Put-Ack

    M

    None

    Yes

    May be stale; C0 has dirty responsibility

    PutM with data, wait for Put-Ack

    MESI graph: a lone reader receives E, E becomes M on a silent store, E downgrades to S or invalidates on forwarded requests, and E evicts with PutE.
    MESI stable transitions in the course model. S and M evictions (PutS, PutM) are as in MSI; transient states and hit self-loops are omitted.

    The cold read and the silent store

    The MESI cold read (GetS, H reads memory, Data grants E) followed by a silent local store that turns E into M is traced in Caches, Lines and Write-Back. The fact to carry forward: H records exclusive(C0) at the grant and nothing reaches H at the store, so the same entry covers E / 0 and M / 1. An exclusive record is a reason to consult C0 on a conflicting request, not evidence that memory holds the latest value.

    That is also why a forwarded read treats both cases alike. On Fwd-GetS an E or M holder becomes S and always replies with Data, and in this course H writes that Data to memory before settling S/S. For a clean E line the write leaves memory unchanged, but H cannot tell clean from dirty, so it always writes. Part 3 follows that clean-holder case step by step.

    Evicting a clean exclusive line: PutE

    Stop the Part 1 trace after its step 2, before any store: C0 = E / 0, C1 = I / -, H = exclusive(C0), memory = 0. C0 now replaces X. Because the line is clean, it sends PutE with no data, enters EI^A (sent PutE, waiting for Put-Ack: local loads and stores stall, and its writeback buffer keeps the line so an Inv or Fwd could still be answered) and waits. H removes C0, records U, writes nothing to memory and sends Put-Ack.

    C0 evicts its clean exclusive copy with PutE, H records no cached copy without writing memory and returns Put-Ack, after which C0 is invalid.
    MESI notified clean eviction: PutE carries no data and memory, already current, is not written.

    Step

    C0 state / value

    C1 state / value

    H directory

    Memory

    Newest data

    Checkpoint

    E / 0

    I / -

    exclusive(C0)

    0

    C0 and memory: 0

    L. C0 evicts X

    EI^A / -

    I / -

    exclusive(C0)

    0

    memory: 0, PutE in flight to H

    1. PutE received

    EI^A / -

    I / -

    exclusive(C0), pend PutE C0

    0

    memory: 0

    H records U, sends Put-Ack

    EI^A / -

    I / -

    U

    0

    memory: 0

    2. Put-Ack received

    I / -

    I / -

    U

    0

    memory: 0

    H's entry does not change at L: no message has reached H yet. Memory is authoritative after the PutE only because the line was E, not M. Had C0 stored first, the line would be M and leave with PutM carrying the data; H would write memory before sending Put-Ack. PutE therefore has to mean 'clean': a cache must never send PutE for a line it has silently written.

    Some protocols drop E silently instead. Then H's exclusive(C0) record outlives the copy, so a later Fwd-GetS or Fwd-GetM to C0 must be able to get a 'no copy' reply and H must fall back to memory. That silent variant is a different protocol, taught later in Part 3, as are requests that meet C0 while it waits in EI^A (Part 4).

    E is worthwhile when a read is followed by a local write while exclusivity lasts: it avoids a permission request at that store. It offers no such shortcut to a cache already in S. Nor does it guarantee that every cold read receives E; a protocol may choose S, and a concurrent reader can change the decision.

    Common pitfall

    Adding an E-to-M notification defeats the silent transition taught here. The directory remains exclusive(C0). Conversely, finding only one physical S copy does not authorise a silent S-to-M store: permission comes from the protocol, not from a guess about other caches.

    Check yourself After the Part 1 cold read and its silent store, H shows the same record it wrote at the grant. How can H safely serve C1 later?

    It treats C0 as the exclusive holder and forwards the request. C0 always replies with Data, whether it is still E or has become M. In this course H always writes that Data to memory before settling S/S, which is correct whether the line was clean or dirty, so H never needs to know which case occurred.

    Interview

    Explain E with two facts: clean and exclusive writable. Then draw a local E-to-M store and leave H unchanged. This shows why cache state and directory knowledge must be discussed separately.

    Related topics

    • Course model

    • MESI cold read and silent store

    • MSI and the dirty-read trace

    • Next: MOESI and Dirty Sharing

    Previous

    19 / 167

    Next: MOESI and Dirty Sharing

    Up next

    Up nextMOESI and Dirty Sharing

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Stable Versus Transient States