Calculate average stalls per instruction.

Consider a CPU contains 2000 instructions, there are 80 misses in L1  cache and 40 misses in the L2 cache. Assume miss penalty from the L2 cache to memory is 200 clock cycles, the hit time of L2 cache is 30 clock cycles, the hit time of L1 cache is 5 clock cycles and these are 1.8 memory references per instruction, then average stall per instruction is ________ ?

sajith menon @sajithmenon
11 Jan 2018 07:29 am

1 instruction=1.8 memory reference

2000 instruction=3600 memory reference

# of stall cycle=miss in l1*miss penalty l1 + miss in l2*miss penalty l2



Avg stall=stall cycle/avg



Deepak Hegde @dk619
30 Sep 2018 06:39 pm
Doesn't 80 misses in L1 cache include those misses in L2 cache misses?
Here 80 misses in L1 cache so L1 hit is (2000-80) and remaining are 80 instructions.
Hence 40 misses in L2 cache must imply 40 hits in L2 and 40 instructions to MM 200 Clocks.

Please correct me if I'm wrong

Ashish Kumar Goyal @dashish
2 Oct 2018 07:01 pm
seems @dk619 is telling right! what u say @sajithmenon? Should it be?