CS FundamentalsHardGATE CS
Kernel same-page merging (KSM) / page deduplication scans for identical pages across VMs and maps them to one frame. What makes this safe when one VM later writes to a merged page?
- A. The merged frame is mapped read-only and copy-on-write, so a write faults and gives the writer a private copy
- B. Writes are blocked forever
- C. All VMs see the write
- D. The hypervisor encrypts the page
Correct answer: A. The merged frame is mapped read-only and copy-on-write, so a write faults and gives the writer a private copy
Deduplication relies on the same copy-on-write mechanism as fork(): sharing is transparent until a write breaks it.
More Operating Systems questions
- Writes of at most PIPEBUF bytes to a pipe have which guarantee when several writers share the pipe?
- A process reads a file sequentially, and the OS detects this. Which buffer-cache policy is most appropriate?
- Which statement about the unified buffer cache (page cache shared by mmap and read/write) is correct?
- A log-structured file system (LFS) writes all modifications sequentially to a log. What is its main background cost?
- Why do SSDs need the TRIM command and wear levelling, unlike hard disks?
- For an SSD, which disk-scheduling algorithm is usually chosen by the OS (e.g. Linux 'none' or 'noop'), and why?