• edited by
2,199 views
0 0 votes

consider a CPU contains 2000 instructions, there are 80 misses in L1 cache and 40 misses in the L2 cache. Assume miss penalty from the L2 cache to memory is 200 clock cycles, the hit time of L2 cache is 30 clock cycles, the hit time of L1 cache is 5 clock cycles and there are 1.8 memory references per instruction, then average stall per instruction is                  

  1. 6.36
  2. 7.92
  3. 9.62
  4. 9.35

2 Answers

0 0 votes

Easiest solution would be:

calculate the total no of clocks without any miss = [ 2000(5) ]*1.8 = 18000

calculate the same with misses as given in the question = [ 2000(5)  + 80(30) + 40(200) ]*1.8 = 36720

stall cycle per instruction would be 36720 - 18000 / 2000 = 9.36

0 0 votes
Average memory stall time per instruction  =  Average number of memory accesses per instruction * Average memory access time.

Assuming no memory stalls for $L_1$ hit

$L_1$ miss rate $=\frac{80}{2000 \times 1.8} =  \frac{1}{45}$

$L_2$ miss rate $= \frac{40}{80} = 0.5$

Therefore, Average memory stalls time per instruction

$\qquad =1.8 \times  (\frac{1}{45} \times (30 + 0.5 \times 200)$

$\qquad = 1.8 \times \left( \frac{130}{45}\right) = 5.2$ cycles
• edited by
Position:
Show:

Related questions

4 4 votes
1 answers 1 answer
2.1k
2.1k views
Ram Swaroop asked Jan 30, 2019
2,089 views
Consider a n-way cache with 'x blocks of 64 words each. The main memory of the system is having 8 million words. Size of the tag field is 16 bits and additional memory re...
5 5 votes
1 answers 1 answer
2.1k
2.1k views
Ram Swaroop asked Jan 29, 2019
2,096 views
A CPU cache is organized into 2 level cache L1 and L2 The penalty for L1 cache miss and L2 cache miss are 60 and 30 respectively for 1200 memory references The hit time o...
0 0 votes
1 1 answer
1.2k
1.2k views
snaily16 asked Jan 28, 2019
1,220 views
Consider a 2 way set associative cache with 4 blocks. The memory block requests in the order.4,6,3,8,5,6,0,15,6,17,20,15,0,8If LRU is used for block replacement then memo...
0 0 votes
1 1 answer
1.1k
1.1k views
Iamniks4 asked Jan 24, 2019
1,138 views
All is fine but how did they calculate the miss rate of level 2 cache (L2) i.e.how is m2=0.46875?