Skip to content
Preptima
mediumConceptMidSenior

What is virtual memory, and what happens when a process touches a page that is not resident?

Virtual memory gives each process a private address space and lets the MMU map virtual pages to physical frames. A page fault traps to the kernel; a minor fault maps memory cheaply, while a major fault waits for storage and can dominate performance. It also connects PAGING to the point an interviewer is testing.

4 min readUpdated 2026-08-15

Answer

Short answer

Virtual memory isolates processes and lets physical memory be allocated lazily. A page fault means no valid translation exists; minor faults are handled in memory, while major faults require storage I/O and are orders of magnitude slower.

Was this answer helpful?

Likely follow-ups

  • Why does allocating a large buffer often not increase resident memory until you write to it?
  • What is the TLB, and what happens to it on a context switch?
  • Your process is slow and the machine shows high iowait with low CPU. What do you suspect?
  • How does memory-mapping a file differ from reading it?

Related questions

Related Topics