in CO and Architecture
1,443 views
1 vote
1 vote

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

in CO and Architecture
1.4k views

3 Answers

4 votes
4 votes
Best answer

 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

4 Comments

So, there is no stall if a memory reference is an L1 hit?
0
0
stalls are for misses i think.
0
0
@Arjun sir, correct me if i am wrong

(150/250)×50 + (150/250)(100/250)×(120)

This should be the answer because memory will be accessed only when miss in L1and L2.
0
0
why miss rate is not 100/150 here? since actually out of 150 times 100 times memory access is occuring and rest 50 times l2 cache is being accesed.
0
0
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.