• retagged by
1,143 views
2 2 votes

A computer has a cache, main memory and a hard disk used for virtual memory. If referenced word is in cache, 20 ns are required to access it. If it is in main memory but not in cache 60 ns are needed to load it into cache and then reference is started again. If word is not in main memory, 12 ms are required to fetch the word from disk followed by 60 ns to copy into cache, the reference is started again. The cache hit ratio is 0.9 and main memory hit ratio is 0.6.
The average time in nano seconds required to access a referenced word on this system is ?

I think answer should be

Cachehit  * Tcache + (1-cachehit) (Tcache + Memoryhit*TMemory +( 1- Memoryhit) (TMemory+Tsec. memory ) )

1 Answer

0 0 votes
cache access time = tc

cache_load_time(from main memory)= tm

cache_load_time(from secondary memory)= tsec

fetch from secondary memory time = ts*10^6 ns (as it is in milisecond)

refrence time(cache access time) = tr

tavg time = cache hit ratio( tc ) + (1-cache hit ratio)( memory hit ratio( tm + tr + ) + (1-memory hit ratio)(ts + tsec + tr))

= 0.9(20)+0.1(0.6(60+20)+0.4(12000000 + 60 + 20))

= 18 + 0.1(0.6*80 + 0.4(12000080))

= 18 + 0.1(48 + 4800032)

= 18 + 0.1(4800080)

= 18+ 480008

= 480026 ns
Position:
Show:

Related questions

2 2 votes
2 2 answers
3.2k
3.2k views
Na462 asked Jul 23, 2018
3,204 views
Consider the following statements:S1 : Doubling the line size halves the number of tags in the cache.S2 : Doubling the associativity doubles the number of tags in the cac...
0 0 votes
1 1 answer
2.4k
2.4k views
Na462 asked Jul 23, 2018
2,361 views
Suppose after analyzing a new cache design, you discover that the cache has too many conflict misses and this needs to be resolved. You know that you must increase associ...
0 0 votes
0 0 answers
543
543 views
Priyansh Singh asked Jul 2, 2018
543 views
Hi sir, i want to ask that how we'll come to know whether this is an independent memory organization or it is a hierarchical organization ? In case of hierarchical it's a...