Accuracy is over issued prefetches: issuedused=1000300=0.30.
Coverage is over original misses: original missesmisses killed=500240=0.48.
Different denominators — that is the whole point. Both land in [0,1] as they must.
Accuracy ::: 0.30Coverage ::: 0.48
Recall Solution 1.2
(a) Next-line — consecutive elements, stride of one line's worth; the +1 rule catches it. (Stride also works, next-line is the cheapest that suffices.)
(b) Stride — a constant gap larger than one element; next-line would miss every element in between.
(c) Correlation — the next address is whatever the pointer holds; no arithmetic pattern exists, so only recorded miss-pairs (A→B) help. Relates to Spatial vs Temporal Locality.
(a) ::: next-line(b) ::: stride(c) ::: correlation
Every access pays thit; only the miss fraction pays the penalty.
AMAT=thit+m⋅tmiss=2+0.04⋅120=2+4.8=6.8 cycles.AMAT_base ::: 6.8 cycles
Recall Solution 2.2
Step 1 — effective miss rate.Why subtract c? Imagine 100 misses lined up as 100 tickets. Coverage c=0.65 means the prefetcher physically tore up 65 of those tickets before the CPU reached them — those 65 accesses now hit in cache. Only the surviving 35 tickets (=100(1−c)) still cost a miss. That is literally the green-slice-removed picture in the figure at the top: the miss bar drops from m to m(1−c).
meff=m(1−c)+Δm=0.04(1−0.65)+0=0.04⋅0.35=0.014.
There is no accuracy factor here — coverage already counts only tickets actually torn up.
Step 2 — new AMAT. Same formula, smaller miss fraction:
AMAT=2+0.014⋅120=2+1.68=3.68 cycles.Step 3 — speedup.3.686.8≈1.848×.
m_eff ::: 0.014AMAT_pf ::: 3.68 cyclesspeedup ::: about 1.85x
Recall Solution 2.3
Confirmed stride =2048−2000=48 (and 2096−2048=48, 2144−2096=48 — all agree). The address-line diagram below traces exactly this: violet dots are the observed accesses, orange squares are the three prefetches issued after 2144.
Prefetch addr+stride⋅k for k=1,2,3 from the latest address 2144:
Use the figure's two-slice picture: the green slice removed is m⋅c=0.06⋅0.20=0.012, but the magenta pollution slice added is Δm=0.025>0.012 — pollution out-stacks the benefit, so we expect a loss even before computing.
meff=m(1−c)+Δm=0.06(0.80)+0.025=0.048+0.025=0.073.AMATpf=1+0.073⋅100=8.3 cycles.
Baseline: AMATbase=1+0.06⋅100=7.0 cycles.
It hurts by 8.3−7.0=1.3 cycles per access. Low accuracy shrank coverage and the useless prefetches evicted live lines (see Cache Pollution and Replacement Policies).
m_eff ::: 0.073AMAT_pf ::: 8.3 cyclesAMAT_base ::: 7.0 cyclesnet change ::: +1.3 cycles (worse)
Recall Solution 3.2
Break-even is the moment the magenta slice exactly equals the green slice — the miss bar returns to its original height. Formally meff=m:
m(1−c)+Δm=m⇒Δm=m−m(1−c)=m⋅c.Δmmax=0.06⋅0.20=0.012.
Any pollution above 0.012 makes it a net loss. In Ex 3.1, Δm=0.025>0.012 — which is exactly why it hurt. Note Δmmax=m⋅c≤m always, consistent with the stated domain.
break-even pollution ::: 0.012
Recall Solution 3.3
Coverage is the product of "issued for" and "succeeded": c=p⋅s=0.9⋅0.5=0.45. Both p and s live in [0,1], so their product c does too — no domain violation.
meff=0.05(1−0.45)=0.05⋅0.55=0.0275.AMAT=1+0.0275⋅100=3.75 cycles.coverage ::: 0.45m_eff ::: 0.0275AMAT ::: 3.75 cycles
Time to fully hide =tmiss=120 cycles. Each line "consumes" 8 cycles of compute. So the prefetch must lead by:
D=⌈cycles per linetmiss⌉=⌈8120⌉=15 lines.
Running fewer than 15 lines ahead means the prefetch is late (partial miss). Running far more risks evicting live data too early. This lead is why degree/distance tuning matters — connects to Memory-Level Parallelism (MLP) and Out-of-Order Execution.
distance ahead ::: 15 lines
Recall Solution 4.2
Before blocking, the access pattern jumped across rows — irregular, so a hardware stride prefetcher could not lock a stride, and a software hint (or correlation prefetcher) was needed.
After blocking, the inner loop walks contiguous elements = unit stride. A plain hardware next-line / stride prefetcher detects this automatically at zero instruction cost.
Therefore the explicit PREFETCHT0 becomes redundant: it would only spend instruction bandwidth for a pattern the hardware already covers. Key insight: improving locality (blocking) can make expensive software prefetching unnecessary — restructure data before adding prefetch instructions.
sufficient mechanism ::: hardware next-line / stride prefetch
Write AMAT as a function of c (recall 0≤c≤1):
meff(c)=m(1−c)+0.05c=m−mc+0.05c=m+c(0.05−m).
With m=0.08: coefficient of c is 0.05−0.08=−0.03<0. So meffdecreases as c grows — more coverage always helps here because the pollution penalty (0.05 per unit coverage) is smaller than the benefit (m=0.08 per unit coverage). This is the figure's rule: green slice removed per unit c (=m) exceeds magenta slice added per unit c (=0.05).
Thus the optimum is the largest achievablec, i.e. copt=1 (the top of coverage's domain):
meff=0.08+1⋅(0.05−0.08)=0.08−0.03=0.05,AMATmin=1+0.05⋅150=1+7.5=8.5 cycles.Interpretation: whenever pollution-per-coverage <m, push coverage to its ceiling c=1; if it exceededm, the coefficient flips positive and the best choice is copt=0 (turn the prefetcher off). The break-even slope is exactly m.
coefficient of c ::: -0.03optimal coverage ::: 1AMAT_min ::: 8.5 cycles
Recall Solution 5.2
Coverage (issued × success): c=p⋅s=0.7⋅0.5=0.35. (Note: accuracy 0.6 is a bandwidth metric — it does NOT enter coverage.)
Pollution from unused prefetches: Δm=0.02⋅(1−0.6)=0.02⋅0.4=0.008 (positive, and ≤m, so within domain).
Effective miss rate:meff=m(1−c)+Δm=0.05(0.65)+0.008=0.0325+0.008=0.0405.
AMAT:1+0.0405⋅100=1+4.05=5.05 cycles.
Baseline:1+0.05⋅100=6.0 cycles.
Net win of 6.0−5.05=0.95 cycles per access — because the green slice (m⋅c=0.0175) removed outweighs the magenta pollution slice (0.008) added.
coverage ::: 0.35pollution ::: 0.008m_eff ::: 0.0405AMAT ::: 5.05 cyclesnet gain ::: 0.95 cycles
Recall Self-check summary
Formula for effective miss rate ::: m_eff = m(1-c) + delta_mFormula for AMAT ::: t_hit + m_eff * t_missCoverage denominator ::: original missesAccuracy denominator ::: prefetches issuedBreak-even pollution ::: delta_m = m * cCoverage domain ::: 0 <= c <= 1Pollution domain ::: delta_m >= 0 (typically <= m)Timely prefetch distance ::: ceil(t_miss / cycles_per_line) lines