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?
- A. Swapping always moves entire processes, never individual pages
- B. Swap space must be exactly the same size as physical RAM
- C. Swap space is only used for storing a process's executable code, never data
- 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
- RAID 5 stripes data across N disks and stores a rotating parity block (the XOR of the corresponding data blocks) on a different disk for…
- An array has 5 disks in RAID 5 (4 data + 1 rotating parity per stripe, effectively). Compared to plain striping (RAID 0) across the same 5…
- A disk subsystem uses C-LOOK (like C-SCAN, but it jumps straight to the lowest pending request instead of running all the way to the…
- In the standard five-state process model, which transition can NEVER happen directly?
- The data structure in which the OS keeps a process's program counter, register contents, state and open-file list is called the:
- Short jobs stuck waiting behind one long CPU-bound job is called the convoy effect. It is characteristic of which scheduling algorithm?