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

  • Architecture Metrics Reference
  • Workload Taxonomy for Architects
  • Architecture Glossary
  • Computer Architecture Cheatsheet
  • Pipeline Fundamentals14
  • Memory Hierarchy15
  • NoC and Interconnect Architecture6
  • Coherency and Memory Ordering9
  • Performance Analysis9
  • Accelerator Architectures6
  • SoC Architecture Tradeoffs9
  • Architecture Interview Prep14
    • Interview Method and Worked Scenarios
    • Architecture Interview Q&A Bank
      • Pipeline and Out-of-Order Questions
      • Caches and Virtual Memory Questions
      • Interconnect Fabric Questions
      • Coherence and Ordering Questions
      • Performance Method Questions
      • Accelerator Questions
      • System Tradeoff Questions
      • Behaviour and Method Questions
Loading lesson

‹Architecture Interview Q&A Bank
  1. Topics
  2. Computer Architecture
  3. Architecture Interview Prep
  4. Architecture Interview Q&A Bank
  5. Coherence and Ordering Questions

Computer Architecture · All levels

Coherence and Ordering Questions

MESI and MOESI, memory ordering models, litmus tests, ACE and CHI questions with traffic numbers.

On this page

    MESI stated completely

    Coherence keeps one value view per address over time. Ordering decides when operations from different addresses become visible relative to each other.

    The MESI safety invariant is single writer or multiple readers. At most one cache holds a line with write permission while every reader stays consistent with that ownership.

    State

    Meaning

    Read

    Write

    I (Invalid)

    No valid copy

    Miss, fetch from owner or memory

    Miss, fetch ownership first

    E (Exclusive)

    Sole clean copy

    Hit, stay Exclusive

    Upgrade silently to Modified

    S (Shared)

    One of several clean copies

    Hit

    Invalidate sharers, move to Modified

    M (Modified)

    Sole dirty copy

    Hit

    Hit, already owner

    Check yourself How is coherency different from memory ordering?

    Coherence gives one value view per address over time. Ordering defines when operations to different addresses become visible relative to each other, which fences and models control.

    Check yourself What invariant captures MESI safety?

    Single writer or multiple readers: at most one owner with write permission for a line, with readers consistent with that ownership. State names without ownership semantics prove nothing.

    Check yourself What is the MESI versus MOESI tradeoff?

    MOESI adds an Owned state holding a shared dirty line, which serves other caches without writing back to memory. It cuts off-chip traffic at the cost of harder ownership tracking and verification.

    Ordering models and litmus tests

    Sequential consistency forbids observable reordering. TSO permits store-load reordering, while ARM and RISC-V RVWMO permit wider reorderings that fences restore.

    Litmus tests turn model rules into executable outcomes. Each test names the forbidden result, so hardware teams check implementation against the model directly.

    Check yourself Why can lock-free software fail on coherent hardware?

    Coherence alone never promised sequential consistency. Without the fences the model requires, weaker cores expose reorderings that the algorithm assumed away.

    Check yourself How do litmus tests help hardware teams?

    They convert abstract ordering rules into concrete forbidden outcomes on small programs. A forbidden outcome in silicon is a model violation, not a performance anecdote.

    Check yourself Why must barriers be stress-tested under congestion?

    Backpressure changes completion and visibility timing, exposing ordering corners that idle fabrics never show. Light-load barrier tests miss them by construction.

    Check yourself When do you pay for a stronger barrier?

    When correctness needs global visibility ordering that acquire and release primitives do not guarantee. Cycle savings never justify an ordering hole.

    ACE, CHI and traffic triage

    ACE extends AXI signalling with snoop channels for coherent masters. CHI is a separate decoupled protocol with its own request, response and data channels, not a newer ACE revision.

    A practical migration risk is attribute mapping: ordering attributes and completion semantics that behave differently under credit pressure. Throughput parity alone cannot prove the mapping.

    Check yourself ACE versus CHI at a high level?

    ACE adds snoop coherence to AXI-style channels. CHI replaces the channel structure with decoupled request, response and data transactions. Know which one the SoC IP speaks, because their completion and ordering rules differ.

    Check yourself Coherence traffic dominates the fabric. What are the fixes?

    Cut false sharing through layout and padding, match snoop versus directory to the sharing pattern, revisit line size, and fix data placement. A faster fabric alone moves the same invalidations sooner.

    Check yourself What indicates a coherence fix is incomplete?

    Repro rate falls but invariant monitors still log near-miss patterns. Fewer crashes without clean invariants is suppression, not a fix.

    Diagram
    Coherent-fabric traffic mix from stated counters
    formula:  share_pct = class_bytes / total_bytes x 100
    example:  520 MB demand + 180 MB writebacks + 170 MB snoops + 130 MB prefetches = 1000 MB
    result:   52 + 18 + 17 + 13 = 100 percent (demand 52, writeback 18, snoop 17, prefetch 13)

    Common mistakes

    Common pitfall

    Sketching MESI without the Exclusive state, or calling CHI a newer ACE, fails the coherence round immediately. State all four MESI states and describe CHI as a separate decoupled protocol.

    Interview

    Likely probes: the ownership invariant, model versus coherence, and CHI accuracy.

    • Single writer or multiple readers, with ownership timelines as evidence.

    • Coherence is per-address values; ordering is cross-address visibility.

    • CHI has its own channels and completion rules; never grades of ACE.

    Check yourself What does an ownership timeline show that counters cannot?

    Who owned, invalidated and acknowledged each line event in order. That causality exposes the stale read that aggregate counters only hint at.

    Related topics

    • Cache coherence for the architect

    • Memory consistency models

    • On-chip networks

    Previous

    82 / 86

    Next: Performance Method Questions

    Up next

    Up nextPerformance Method Questions

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Pipeline and Out-of-Order Questions
    • Caches and Virtual Memory Questions
    • Accelerator Questions