A computer with a single cache (access time 40ns) and main memory (access time 200ns) also uses the hard disk (average access time 0.02 ms) for virtual memory pages. If it is found that the cache hit rate is 90% and the page fault rate is 1%
I have to work out the EAT time for this and the speedup due to use of cache. I'm really confused about how to do this because I have seen two different ways of doing this and I'm not sure which is correct
solution 1: 0.90*40 + 0.10[0.01*20,000 + 0.99*200]=75.8 ns
solution 2: 0.90*40 + 0.10[0.01*(20,000+200) + 0.99*(2*200)]= 95.8 ns
In the second one, it accesses main memory twice when there is a page hit and accesses disk and main memory when there is a page fault. Which one is correct?
And for the speedup, which equation do I use?: Memory access time/(Memory + Cache access EAT) OR EAT without cache/EAT