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 ? $ourav asked May 17, 2016 edited May 18, 2016 by $ourav $ourav 3.2k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 votes 3 votes Tavg = 0.8 x [1] + 0.2 x [ 0.9 x (1+10) + 0.1 x (1+10+500) ] ns = 13 ns tvkkk answered May 18, 2016 selected Apr 4, 2017 by Bikram tvkkk comment Share Follow See all 4 Comments See all 4 4 Comments reply $ourav commented May 18, 2016 reply Follow Share i think, from your formula that u r considering hierarchical access right. 0 votes 0 votes tvkkk commented May 18, 2016 reply Follow Share 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 votes 1 votes $ourav commented May 18, 2016 reply Follow Share 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 votes 1 votes tvkkk commented May 18, 2016 reply Follow Share Thanks for the clarification. I'd like to read more about the same. Is it given in some book? 0 votes 0 votes Please log in or register to add a comment.
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 asu answered May 18, 2016 edited May 18, 2016 by asu asu comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Bikram commented Apr 4, 2017 reply Follow Share 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 votes 1 votes Bikram commented Apr 4, 2017 reply Follow Share @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 votes 3 votes mcjoshi commented Apr 5, 2017 reply Follow Share 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 votes 0 votes Please log in or register to add a comment.