OS & Hardware

Memory access time is 100 ns and handling a page fault takes 8 ms. If a page fault occurs once per million accesses, what is the average access time approximately?

  1. AAbout 108 ns
  2. BAbout 100 ns
  3. CAbout 8 ms
Show answer and explanation

Answer: A. About 108 ns

The average access time is (1 − p) × 100 ns + p × 8 ms; with p = 10⁻⁶ it is about 100 ns + 10⁻⁶ × 8,000,000 ns = 100 + 8 = 108 ns. Even at one fault per million, page faults are costly enough to slow the average by 8%. About 100 ns ignores page faults, and about 8 ms is the value if every access faulted.

  • A. Correct. 100 + 10⁻⁶ × 8,000,000 ≈ 108 ns.
  • B. About 100 ns ignores the effect of page faults.
  • C. About 8 ms is the value if every access faulted.
Practice this topic Back to topic

More OS & Hardware questions

  1. During a context switch, what must be saved for the process being switched out?
  2. Why can a process context switch degrade performance more than the time spent saving and restoring registers would suggest?
  3. What is the advantage of tagging each TLB entry with an ASID (address space identifier)?
  4. What mechanism mainly lets the OS reclaim the CPU at regular intervals, even from programs that never give it up voluntarily, and switch to other processes?
  5. When reading a device status register via memory-mapped I/O as above, why is it declared volatile and the region configured as uncached?