in CO and Architecture edited by
3,196 views
0 votes
0 votes

Consider a system with 2 level cache. The access times of L1-Cache, L2-Cache and Main Memory are 1ns, 10ns and 500ns. The hit rate of L1 and L2 caches are 0.8 and 0.9 respectively. What is the average access time ?

in CO and Architecture edited by
by
3.2k views

2 Answers

3 votes
3 votes
Best answer

 Tavg = 0.8 x [1] + 0.2 x [ 0.9 x (1+10) + 0.1 x (1+10+500) ] ns

             = 13 ns

selected by
by

4 Comments

i think, from your formula that u r considering hierarchical access right.
0
0

Memory is always hierarchical, as per my understanding.
If both L1 and L2 caches are accessed simultaneously, what's the use of having 2 different caches? L1 is supposed to be searched first then L2 then main memory.

1
1
By simultaneous access it means CPU can fetch the data from L2-cache directly.

By hierarchical access it means L1-cache fetch the data from L2-cache and CPU fetch the data from L1-cache (hence we add the latency at each level).
1
1
Thanks for the clarification. I'd like to read more about the same. Is it given in some book?
0
0
0 votes
0 votes

t1 * h1 + (1- h1) h2 t2 + (1-h1) (1-h2) tm

Tavg=0.8*1+0.2*0.9*10+0.2*0.1*500

         =10.98ns

check here similar one

https://gateoverflow.in/3653/gate2004-it_12

edited by
by

4 Comments

this problem does not mention  explicitly to take which policy .. in that gate question @asu mention that was solved simultaneous way due to some info given in the question itself.

But here L1 and L2 cache access time is given , from that we can conclude that it is hierarchical policy to use as when both cache access time is given Cpu fetch from l2 and l2 fetch from l1 cache hence we need to consider delay in  each case.
1
1

@asu  @mcjoshi and @vijaycs

this problem can be solved using  Hierarchical method only .. as in the question it is mentioned that L1-Cache, L2-Cache access time so in case of hierarchical cpu fetch data from L2 cache which fetch the data from L1 cache .. that's why delay or latency need to add each level while calculating the access time .

3
3

Yes @Bikram sir. Agree !! Because it is clearly mentioned L-cache and  two caches are organised in levels. 

.... didn't knew much when i made last comment (sept. 2016)

0
0