386 views
0 0 votes

Suppose that in 500 memory references there are 100 misses in first level and 50 miss in second level cache. Assume that miss penalty from L2 cache to memory is 100 cycles. The hit time of L2 cache is 20 cycles. If there are 2 memory references per instruction, the average stall per instruction is _________.

1 Answer

1 1 vote
Stalls for instruction always happen when we misses in primary cache

$\therefore for \ 2 \ memory \  reference \ 2 * \frac{1}{5}=0.4 \ misses\ in \ L1 \ cache.$

Similarly for L2 $= 0.2 \ misses$

Now calculate Avg stalls which is $0.4*20+0.2*100=28 \  cycle \ stalls.$
Position:
Show:

No related questions found