CS FundamentalsVery hardProduct company interview · GATE level

Memory access takes 200 ns. A page fault takes 8 ms to service if the replaced page is clean and 20 ms if it is dirty, and 40% of replaced pages are dirty. What is the largest page-fault rate for which the effective access time stays within 10% of the memory access time?

  1. A. About 1 fault per 640,000 accesses
  2. B. About 1 fault per 400,000 accesses
  3. C. About 1 fault per 1,000,000 accesses
  4. D. About 1 fault per 64,000 accesses

Correct answer: A. About 1 fault per 640,000 accesses

Average service time = 0.6 x 8 + 0.4 x 20 = 12.8 ms = 12,800,000 ns. Require (1 - p) x 200 + p x 12,800,000 ≤ 220, i.e. p x 12,799,800 ≤ 20, so p ≤ 1.5625 x 10^-6, about 1 fault in 640,000 accesses. Using only the 8 ms clean time gives 1 in 400,000, using 20 ms for every fault gives 1 in 1,000,000, and 1 in 64,000 is an order-of-magnitude slip. The tolerance is tiny because a fault is about 64,000 times slower than a memory access.

More Operating Systems questions

Exams that ask this topic