edited by
1,195 views
5 votes
5 votes
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 of L1 and L2 are 5 and 10 clock cycles and penalty for L2 cache miss to main memory is 70 clock cycles. The average memory access time will be

 

edited by

1 Answer

Best answer
5 votes
5 votes
There are in total 1200 references,

No. of hits in L1 : 1200-60 = 1140, so L2 will be referenced 60 times out of which 30 are misses in L2

No. of hits in L2 : 60-30, so MM will be referenced 30 times.

Access time for 1200 references:1140*acesstime(L1) + 60* acesstime(L2+L1) + 30*acesstime(MM+L2+L1)

Average access time: 1140*acesstime(L1) + 60* acesstime(L2+L1) + 30*acesstime(MM+L2+L1) / 1200

 

(OR)
 

L1 will be referenced 1200 times, (hit + miss)

L2 will be referenced 60 times, (hit + miss)

MM will be referenced 30 times, (hit)

Access time for 1200 references: 1200*acesstime(L1) + 60*acesstime(L2) + 30*acesstime(MM)

Average access time: 1200*acesstime(L1) + 60*acesstime(L2) + 30*acesstime(MM) / 1200
selected by

Related questions

0 votes
0 votes
1 answer
2
0 votes
0 votes
1 answer
3