Computer Architecture · All levels
Replacement Policy and Miss Behavior — Worked Example
Worked Example for Replacement Policy and Miss Behavior (Memory Hierarchy).
Scenario
A product workload exposes a Replacement Policy and Miss Behavior issue late in architecture review.
Timeline
Metric fails at review meeting
Engineer captures metric report, trace snippet, and workload phase
Root cause traced to incorrect assumption from prior stage
Minimal architecture change or policy experiment applied and documented
Workload regression matrix re-run on the tagged model
Outcome
Architecture decision accepted with documented metric movement, risk, and validation proof.
Senior debrief
After solving the example, write the debrief a lead would expect: what changed, why it worked, what could regress, and what permanent methodology update prevents recurrence.
STAFF ARCHITECTURE REVIEW MEMO — Memory Hierarchy / Replacement Policy and Miss Behavior
1. Current state
- Failing / watched metric: LLC miss decomposition + reuse distance report
- Workload / benchmark / trace: <fill before review>
- Model tag, RTL tag, simulator version, PMU setup: <fill before review>
- Scope: core, cache level, NoC path, coherency domain, accelerator, or SoC budget
2. Root-cause hypothesis
- Most likely mechanism: <name pipeline/cache/NoC/coherency/perf mechanism>
- Competing hypothesis: <name the second plausible cause>
- Evidence still missing: <counter, trace, waveform, model sweep, or workload slice>
3. Proposed action
- Minimal reversible change: <microarchitecture, policy, sizing, traffic, or software contract change>
- Expected improvement: <metric delta>
- Regression risk: Mis-tuned replacement can cause latency SLO violations and noisy-neighbor behavior in shared-cache systems.
4. Regression and signoff
- Re-run: LLC miss decomposition + reuse distance report
- Must not regress: SoC QoS enforcement, firmware scheduling, and customer-perceived performance stability rely on miss behavior.
- Decision owner: architecture ownerBefore / after metric graph
METRIC TREND GRAPH — Replacement Policy and Miss Behavior
IPC / throughput
^
| target
| ─ ─ ─ ─ ─ ─ ─
| ● after bounded fix
| /
| ● baseline
| /
|● failing run
+---------------------------------> experiment index
bad tag hypothesis accepted fix
Readout rule:
- one dot is not a conclusion
- compare against same workload, seed, model tag, and counter setup
- explain why the fix moved the metric, not just that it movedArchitecture deep dive
Cache hierarchy trades area and power for AMAT and bandwidth.
Concept diagram
MEMORY HIERARCHY
Core
├─ L1I / L1D (cycles: 1-4, tiny, latency critical)
├─ L2 (cycles: 8-20, private or cluster)
├─ LLC / SLC (shared, bandwidth + coherency point)
├─ NoC (queueing + arbitration)
└─ DRAM/HBM (large penalty, high energy)
AMAT = hit_time + miss_rate × miss_penalty
But senior analysis also asks: MLP, bandwidth, QoS, and tail latency.Metric graph
MISS PENALTY WATERFALL
L1 hit ██ 3 cyc
L2 hit ████████ 12 cyc
LLC hit ███████████████ 32 cyc
DRAM miss ████████████████████████████████████ 180 cyc
Small MPKI can still dominate if miss penalty is huge.Metrics and artifacts
MPKI per level
L2/L3 bandwidth utilization
replacement policy stats
prefetch accuracy
Mini case study
Doubling L2 size reduces capacity misses but IPC improves only 3% because conflict misses dominate a shared workload. Fix data layout and false sharing before more SRAM.
Debug branches
If MPKI high but bandwidth low, footprint may exceed capacity.
If bandwidth saturated, coherency or DMA may be the real limit.
Senior review question
Ask: what single metric would prove this concept is working or failing on your workload?
Key takeaways
Connect every architecture claim to a workload and measurable metric.
State verification and PPA impact before proposing design changes.
Common pitfalls
Feature-driven design without MPKI/IPC/bandwidth evidence.
Ignoring coherency and NoC traffic in cache and accelerator sizing.
Study notes
Re-read this topic with one concrete workload.