1,177 views
0 votes
0 votes

Suppose that in 250 memory references there are 30 misses in first level cache and 10 misses in second level cache. Assume that miss penalty from the L2cache memory are 50 cycles. The hit time of L2 cache is 10 cycles. The hit time of the L1 cache is 5 cycles. If there are 1.25 memory references per instruction, then the average stall cycles per instruction is ________.

Can someone please tell me why don't we consider L1 hit time. Why can't the answer be 30/250(5 + (20/30)(10) + (10/30)(50+10)) ? 

1 Answer

2 votes
2 votes
memory stalls/m.m references = Miss in L1*Miss penaltyL1

MissPenalty L1 = HitTime L2 + MissInL2*MispenaltyL2

= 30/250*(10 + (10/30)*50)
= 3/25(10 + 50/3)
=3/25(80/3)=80/25=16/5

Avg stalls/ instructions = (no. of m.m stalls / m.m reference)*(mm ref/ins)
=16/5 * 1.25 = 4

Related questions

1 votes
1 votes
0 answers
1
srestha asked Dec 27, 2018
432 views
Suppose there are $2$ level cache. If there are $L_{1}$ and $L_{2}$ are $2$ level cache, if both have some miss rate, then still why we need miss penalty for cache in bo...
1 votes
1 votes
1 answer
2
MayankSharma asked Aug 29, 2018
2,504 views
Are miss latency & miss penalty same in cache?if no then what's the difference???
1 votes
1 votes
1 answer
3
srestha asked Jul 25, 2018
2,232 views
Why we need to calculate miss penalty? I mean in miss rate we get every information about page table and valid/invalid bit. So, still why we calculating miss penalty?got ...
3 votes
3 votes
1 answer
4