Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

4. Cache performance The base CPI of a system, excluding memory stalls, is C Loa

ID: 3746914 • Letter: 4

Question

4. Cache performance The base CPI of a system, excluding memory stalls, is C Loads and stores collectively constitute LS% of all instructions Accessing the L1 data cache takes K cycles (accounted for in base CPl) Accessing the L1 instruction cache takes P cycles (accounted for in base CPI) Misses to main memory take an average of D cycles. The L1 D-cache miss rate/access is Md. The L1 I-cache miss rate/access is Mi. a) What is the CPl of the above system, including memory behavior? b) Your team is considering adding an L2 cache for data accesses only. Assuming that the L2 access time is 4"K, how high can the L2 miss rate be and still improve AMAT?

Explanation / Answer

SOLUTION:-

(a) The CPI of the above system, including memory behavior :-

CPI = CPIwithout-memory-stalls+ Stall-Cycles/Instruction

CPI = C + 1 access/instruction * Mi misses/access * D cycles/miss + LS accesses/instruction * Md misses/access * D cycles/miss = C + 1*Mi*D + LS*Md*D

= C + Mi*D + LS*Md*D

(b) shortcut method :-

we are substituting exactly one miss penalty D, with a new miss penalty (4K + L2MissRate ( D) ) hereby,

D > (4K + L2MissRate (D) )

L2MissRate < (D – 4K ) / D = 1 – 4K / D

----------------------------------------------------------------

Longcut method:-

AMATold  > AMATnew

AMATold  = (1 * (P + Mi(D) ) + LS * (K + Md(D)) / (1+LS)

AMATnew = (1 * (P + Mi(D) ) + LS * (K + Md(4K + L2MissRate(D))) / (1+LS)

We will multiply both sides by (1+LS), then expand and subtract generic terms in order to come back at

D > (4K + L2MissRate (D) )

L2MissRate < (D – 4K ) / D = 1 – 4K / D

============================================================================

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote