• retagged by
5,145 views
5 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?

3 Answers

Best answer
9 9 votes

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 8 votes

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

3 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

Position:
Show:

Related questions

8 8 votes
4 4 answers
7.8k
7.8k views
Parshu gate asked Dec 25, 2017
7,758 views
Suppose that in $500$ memory references there are $50$ misses in the first level cache and $20$ misses in second level cache. Assume miss penalty from the $L_{2}$ cache t...
1 1 vote
1 1 answer
3.4k
3.4k views
Shashank Chandekar asked Oct 26, 2016
3,441 views
anyone elaborate the reason for each stall cycles.
0 0 votes
1 1 answer
2.1k
2.1k views
Na462 asked Oct 12, 2018
2,069 views
What is the difference between Effective CPI and Average CPI ?A program is run on 40 MHZ with instruction mix and corresponding clock cycle count.Determine : * Effecti...
0 0 votes
1 1 answer
1.1k
1.1k views
Raj Singh 1 asked Jan 9, 2019
1,140 views
The title says it all: How many stall cycles are caused due to each incorrect branch prediction?Additional details you might need:Branch is executed in execution stage of...