CS FundamentalsModerateWipro · Cognizant pattern

Swap space (backing store) on disk lets the OS support more processes than fit entirely in physical RAM. Which statement about it is correct?

  1. A. Swapping always moves entire processes, never individual pages
  2. B. Swap space must be exactly the same size as physical RAM
  3. C. Swap space is only used for storing a process's executable code, never data
  4. D. When a page is needed and no frame is free, a victim page is written to swap space (if modified) so its frame can be reused, and brought back in on a future fault

Correct answer: D. When a page is needed and no frame is free, a victim page is written to swap space (if modified) so its frame can be reused, and brought back in on a future fault

Paging-based virtual memory writes a victim page out to swap only if it's dirty (unwritten changes exist; clean pages backed by a file can simply be discarded and re-read from the file), freeing its frame for the faulting page, and reloads it later if referenced again — this is per-page, not whole-process swapping (which is the older, coarser technique).

More Operating Systems questions

Exams that ask this topic