CS FundamentalsModerateGATE CS

A page fault occurs on a store instruction. Which sequence is correct for a demand-paged OS when a free frame exists?

  1. A. Trap to the kernel, check the access is valid, read the page from backing store into a free frame, update the page table, restart the faulting instruction
  2. B. Trap, kill the process because the page is invalid, reload the program
  3. C. Trap, write the page to disk, update the TLB, continue with the next instruction
  4. D. Trap, allocate a frame, update the page table, skip the faulting instruction

Correct answer: A. Trap to the kernel, check the access is valid, read the page from backing store into a free frame, update the page table, restart the faulting instruction

A page fault on a valid but non-resident page is serviced transparently; the faulting instruction must be restarted (not skipped) once the page is present. Only an invalid reference is fatal.

More Operating Systems questions

Exams that ask this topic