in CO and Architecture
287 views
1 vote
1 vote

 

I want to understand why in case of cache miss, we don’t consider cache search time?? in case if it is hit, we have hit cache anyway, but in case of failure, we are still accessing cache, and when unable to find it there, only then we load it from main memory. So why is in the solution, cache time not included for cache miss??

in CO and Architecture
287 views

1 comment

In case of failure we are not accessing cache , we are accessing memory. Cache will only be accessed when we have to put missed memory block in cache and that is not mentioned in the question. It will be mentioned in the question if locality of reference is used or we have to include block transfer time.
0
0

1 Answer

0 votes
0 votes
According to the solution which you have specified, the type of access considered is simultaneous access.
But in the question, they have not mentioned the type of access which means that we need to consider hierarchial access [ by default ].

So, given tc=3ns, cache size=1MB, block size=256 B, word size=64 bits=8 bytes, h=0.94
each block contains 256/8 = 32 words
to fetch the first word it takes 20ns and the remaining 5ns each
therefore, Tm=20+(31*5)=175 ns
Avg. memory access time= h*tc + (1-h)*(tc+Tm) = (0.94*3)+(0.06)*(3+175) = 13.5 ns

Related questions