Suppose that in 1000 memory references there are 100 misses
Suppose that in 1000 memory references there are 100 misses in the first level cache and 10 misses in the second level cache.
a) What is the miss rate (local or global) for the first level (L1)?
b) What is the miss rate (local) for the second level (L2)?
c) Assume miss penalty from L2 cache to memory is 200 clock cycle, the hit time of the L2 cache is 10 clock cycles, and the hit time of L1 is 1 clock cycle. What is the average memory access time? Ignore impact of writes.
Solution
Answer :
a) What is the miss rate (local or global) for the first level (L1)?
Answer :
Miss Rate L1=100/1000=0.1---->10%
b) What is the miss rate (local) for the second level (L2)?
Answer :
Miss Rate L2=10/100=0.1-------->10%
Global Miss Rate for Last Level Cache :
Miss Rate L1L2=Miss Rate L1 * Miss Rate L2=0.1*0.1=0.01---->1%
c) Assume miss penalty from L2 cache to memory is 200 clock cycle, the hit time of the L2 cache is 10 clock cycles, and the hit time of L1 is 1 clock cycle. What is the average memory access time?
Answer :
Average Memory Access Time(AMAT)=Hit TimeL1 + Miss RateL1 * (Hit TimeL2 + Miss RateL2 * MissPenaltyL2)
Miss PenaltyL2=200 clock cycles
Hit TimeL1=1 clock cycle
Hit TimeL2=10 clock cycles
AMAT=1 clock cycle + 0.1 * (10 + 0.1 *200) clock cycles=1+3=4 clock cycles
