retagged by
527 views
0 votes
0 votes
Consider a two level memory hierarchy having only one level cache and main memory. Cache and Main memory access times are $20$ ns and $120$ ns/word respectively. The size of cache block is $4$ words .

If main memory is referenced $40 \%$ of the times, then average access time is _______ ns
retagged by

2 Answers

Best answer
4 votes
4 votes

Tavg = Hit rate * Cache access time + Miss rate * ( Cache access time + MM access time ) 

       = 0.6 * 20 + 0.4 * (480+20)   [ as MM access time 120 ns/word so for a particular block access tme is 120 * 4=480 ns ]

       = 12 + 200

       =  212

As it says " Consider a two level memory hierarchy having only cache and main memory. " means if there is a cache miss we can find the block in MM only .

Cache and MM access times are provided in the question, so when there is a cache miss only then we can access the main memory that means here Hierarchical access is used.

By Default cache access is Hierarchical --> https://gateoverflow.in/36416/effective-access-time-vs-average-access-time 
 Hence we need to use hierarchical formula here ..

selected by
0 votes
0 votes
I am getting :

20*0.6 + (120)*4*0.4 = 204.
Answer:

Related questions