3,168 views
0 votes
0 votes

A memory system contians a cache, a primary memory and a secondary memory. The access time of cache is 5ns and it has 80% hit rate. The access time of main memory is 100ns and it has 99.5% hit rate.The access time of virtual memory is 10ms. What is the average access time of the hierarchy?

(A) 10000ns
(B) 50099.5ns
(C) 10024ns
(D) None of these

3 Answers

Best answer
6 votes
6 votes
Interesting Question ,

First of all lets understand the concept here

We have three memory source cache , primary memory , secondary memory ( hard disk / virtual memory)

So for accessing any data CPU must look in cache first if it is cache miss then primary memory if primary memory miss then secondary memory or say virtual memory.

hence effective access time = cache hit ( cache access time ) + cache miss ( cache access time + primary hit ( primary access time ) + primary miss ( primary access time + virtual memory access time ))

So if you would solve as per above you would get
access time  = 10025 ns

but normally we ignore the cache access time when there is cache miss as it is very small as compared to primary access time and virtual memory access time  similarly when there is primary miss we ignore the primary access time as it is very small compared to secondary access time

So overall our new formula becomes

effective access time = cache hit ( cache access time ) + cache miss ( primary hit ( primary access ) + primary miss ( virtual memory access t))
=.8( 5ns) + (.2 ) ( .995 * 100 ns + .005 ( 10000000 ns ))
=10024 ns exact
selected by
2 votes
2 votes
The average access time = Cache Hit $\times$ Cache Time + Cache Miss( Main Memeory Hit $\times$ Main Memeory Access Time + Main Memeory Miss (Main Memeory Acsess time + Virtual Memory Acess Time ))

The average access time =$\frac{400}{100} + \frac{20}{100}\left (99.5+(0.005(10000100) ) \right )$
                                      = 4+$\frac{1}{5}\left (99.5+(0.005(10000100) ) \right )$

                                      = 4+10020 = 10024 nsec

Related questions

2 votes
2 votes
0 answers
1
2 votes
2 votes
1 answer
2
3lurryface asked Jan 9, 2019
1,054 views
If there is 2 or more level paging for processes, is it possible to have more than 1 page fault while accessing any single addressable unit(byte or word) ?
1 votes
1 votes
1 answer
3
Na462 asked Sep 29, 2018
687 views