Average access time in cache memory along with hard disk

1.1k views
A system has cache main memory and disk for virtual memory. If referenced word in cache $30$ ns to access it. If it is not in cache $80$ ns to load it in cache and reference is started again. If the word not in memory then $22$ms to bring from disk to memory and $80$ ns from memory to cache and start again. Cache hit ratio is $0.8$ memory hit ratio is $0.9$

edited
0
1

In this question nothing is mention about search time inside memory and disk, so we safely ignore search time .

so that average access time is :

cache access time + MM access time + Disk access time

\begin{align*} & 0.8 * 30 \text{ ns } \\ &+ 0.18 * \left ( 30 + 80 \right ) \text{ ns } \\ &+ 0.02 * \left ( 30 + 80 + 22000000 \right ) \text{ ns } \\ &=\bf 440046 \text{ ns } \\ \end{align*}

in each above case , cache  and MM and disk we consider search time to find that referenced word = 0  .

edited by
0
From where you have used 0.18.....
0
it is (1-0.8)*0.9 = 0.18

Total time = Cache Access + Memory Access + Disk Access

= Cache time + Cache Miss * (Transfer from Memory to cache + 2nd Cache reference ) + Cache Miss * Memory Miss ( Fetch Disk + Transfer from Disk to Memory )
= 30 + 0.20*(80+30) + 0.20*0.10(80 + 22,000,000)
=30 + 22 + 440001.6
= 440053.60 ns
$\approx 440 \mu s$

0
80 + 22000 + 30 rt?
1
Sir if der is miss in Cache, miss in memory so we will go upto disk and then transfer that file to maine memory. now at this time condition is like cache miss and memory hit.

Actually second reference of cache already counted in 0.20*(80+30) .. is it not ?
1
yes, I missed that :)
0
why dont we consider hit ratios ....??
0
0.8 * (30) + 0.2 (0.9 * (80+30) + 0.1 (80+30+22000000) )=440026ns

ans should be like this, isn't it?

i'm not getting logic here....can u explain further?
1
you can expand that 0.8 * 30 + 0.2 * 30 = 30 - we can rewrite like this also. But given answer is wrong due to "ms".
0
what about it ratio for cache
1 vote
I did something Like this

0.8*30 + 0.2*0.9*(80+30) + 0.2 *0.1*(80+30 + (22000000))=440046 ns.

Related questions

1
495 views
$h_1→L1$ hit ratio $h_2→L2$ hit ratio $C_1→ L1$ access time $C_2→$Miss penalty to transfer information from L2 to L1 $M→$ ... them as highlighted in red. Is my equation correct or book's equation. Or something more is going on here, which I am unaware of?
2
92 views
What events happen when we say that a cache at level i is accessed? (I am able to use the cache formulas as given in textbooks and also most of the times, I arrive at the correct answer, but I want to fully understand the basic details.) My understanding is the following ... in the access duration? Do we include any extra time for STORING the data in the level (i-1)th cache as is done here ?
3
226 views
If the question is given, L1 cache access time is 150ns/word and one block of L1 cache contains 5words. Should I multiply the access time by 5 or leave it at 150ns as memory is word addressable?