1
$\begingroup$

This question seems to be causing a lot of debate and I'm wondering whether my working is correct.

A computer with a single cache (access time 20ns) and main memory (access time 500ns) also uses the hard disk (average access time 0.01ms) for virtual memory using paging. If it is found that the cache hit rate is 95% and the page fault rate is 1%
Calculate the effective (average) access time (EAT) of this system for a sequential access system.

(a) 73.5ns. (b) 55ns. (c) 50ns. (d) 74.75ns.

My working was as follows: (0.95x20) + 0.05 (0.01(10000+500+20) + 0.99(500+20))

Leading me to an answer of 50 being C), however others have seem to have chosen D) as their answer

Any help would be appreciated.

$\endgroup$
1
  • $\begingroup$ hard disk (average access time 0.01ms) WHOA! (Or solid state, but the cache access time doesn't look the type.) $\endgroup$
    – greybeard
    Jan 10 '21 at 17:42
0
$\begingroup$

Seems correct , cache hit gives you 0.95*20 ns if it misses then 0.05 or 5% of the time you consult memory that is 0.05*( no page fault hence 0.99*( 500 from mem to cache + 20 from cache to cpu) else if page fault occurs then 1% or 0.01 *( 10000 ns from disk to mem + 500 ns from mem to cache + 20 ns from cache to cpu)) Should be 45.5 ns which I would give as C

$\endgroup$
0
$\begingroup$

The problem is a bit unclear, but I would assume that the page fault rate is 1% for all accesses, not just for the 5% that didn’t hit the cache. So the total is 0.95 x 20 + 0.04 x X + 0.01 x Y.

Then there is the question how long X or Y are: Many processors will fill a cache line from memory, then access the cache. Total x = 500 + 20. Others might deliver data directly from main memory, X = 500. Similar for Y.

$\endgroup$
0
$\begingroup$

just came across the same question

you need to add an extra 500 to your calculation for accessing the main memory because it actually has to be accessed twice: once for making the page table and another for the actual data, when using virtual memory

(0.95x20) + 0.05 (0.01(10000+500+500+20) + 0.99(500+500+20)) =75 which i would have guessed is closeset to D

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.