Looking for reliable answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Explore thousands of questions and answers from a knowledgeable community of experts on our user-friendly platform. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform.

If a referenced memory word is in the cache, 20 ns are required to access it. If it is in main memory but not in the cache, 60 ns are needed to load it into the cache (this includes the time to originally check the cache), and then the reference is started again. If the word is not in main memory, 12 ms are required to fetch the word from disk, followed by 60 ns to copy it to the cache, and then the reference is started again. The cache hit ratio is 0.9 and the main memory hit ratio is 0.6.
What is the average time in ns required to access a referenced word on this system?


Sagot :

Answer:

480,026ns

Explanation:

the time it would take to access word = 20ns

time coipied in cache = 60 ns

20ns +60ns = 80ns

this is the time to acess from main memory

it takes 12ms to move memory word to main memory

1ms is 1000000

so 12ms = 12000000ns

1200000+20+60

= 12000080 nanoseconds

hit ratio = 0.9(cache)

hit ratio = 0.6 (main memory)

miss rate = 0.1

probability of word being in main memory

= 0.1 * 0.6

= 0.06

the hit ratio of disk = 1

prob = 0.1 * 0.4 * 1 = 0.04

.1 = miss rate of cache

.4 = miss rate of main memory

1 = hit ratio of hard disk

In cache with prob 0.9, total ns = 20

in main memory prob = 0.60, total ns = 80

in hard disk prob = 0.04, total ns = 12000080ns

average time = [pr(cache)*access time] + [pr(main memory)*access time] + [pr(hard disk)*access time]

= (0.9*20)+(0.06*80)+(0.04*12000080)

= 18+4.8+480,003.2

= 480,026 ns