1,463 views
1 votes
1 votes

Suppose that in 1000 memory references there are 150 misses in first level and 100 misses in second level cache. Assume that miss penalty from Lcache to memory is 120 cycles. The hit time of Lcache is 50 cycles.

If there are 4 memory references per instruction, the average stall per instruction is

3 Answers

Best answer
4 votes
4 votes

 Tavg stall/ints  = Miss in L1/int * Hit in L2 + Miss in L2/int * Miss Penality in L2(memory access )

here    4 memory for 1 instruction 
so for 1000 memory =  1000/4 = 250 

Miss in L1 = 150 Miss in L2 = 100 Hit time L2 = 50 Miss penalty L2 = 120 

therefore  T
avg stall/ints  = $\frac{150}{250}$*50 + $\frac{100}{250}$*120 = 78

selected by
0 votes
0 votes
4 memory references → 1 instruction
1000 memory references → ? instructions.
Number of instructions = 10004=250 [#  # ]=[#  1# ×ℎ 2]+[#  2# ×  2]
=[150250×50]+[100250×120]
=[30+48]=78
0 votes
0 votes
Simplest Approach!
Just think how we can get stall,

if I went to L1 and I get a miss then to overcome it either go to L2 and rectify it or you went to L2 and you also get a miss there.

(150/250) [ 50+ (100/150)*120)= 78.

No related questions found