in CO and Architecture retagged by
3,908 views
5 votes
5 votes
Suppose that in 500 memory references there are 50 misses in the first level cache and 20 misses in the second level cache.Assume miss penalty from the L2 cache to memory is 100 cycles.The hit time of L2 cache is 20 cycle.The hit time of the L1 cache is 10 cycles. If there are 2.5 memory references per instruction.How many average stall cycles per instructions are there?
in CO and Architecture retagged by
3.9k views

1 comment

0
0

3 Answers

9 votes
9 votes
Best answer

Average stalls per instruction = $\frac{Memory\ Access}{Instruction} \times \frac{Miss}{Memory\ Access} \times\frac{Cycles}{Miss}$

avg stalls per instruction = stalls due to L1 miss + stalls due to L2 miss
$=2.5 \times \frac{50}{500} \times 20 + 2.5 \times \frac{20}{500} \times 100\\ =5+10\\ =15$

ref: http://cs.uwec.edu/~buipj/teaching/cs.352.f12/lectures/lecture_08.html

selected by
8 votes
8 votes

Please tell me whether this way is correct or not. I got same answer. :P

4 Comments

Anvesh7 

He didn't calculate L-2 cache miss rate. He calculated Stall cycles directly.

0
0
Nice
0
0
He did calculate  l2 miss rate which is 0.4 and l2 miss oenalty also...evaluate it carefully..you will find out
0
0
3 votes
3 votes

 #instruction=memory reference/ memory reference per instru.=500/2.5=200

Avg Stall per instruction= (Miss in L1/#instruction)* Hit in L2+( Miss in L2 /#instruction)* Miss Penalty in L2

                                          =(50/200)*20+(20/200)*100

                                          =5+10

                                          =15

Related questions