CS FundamentalsHardGATE CS
Which statement about the unified buffer cache (page cache shared by mmap and read/write) is correct?
- A. It forces every read() to go to disk
- B. It avoids double caching and keeps mmap and read() views of a file consistent
- C. It prevents mmap from working on files
- D. It stores only metadata
Correct answer: B. It avoids double caching and keeps mmap and read() views of a file consistent
Older systems kept file data both in a buffer cache (for read/write) and in VM pages (for mmap), wasting memory and risking inconsistency; a unified cache uses one copy.
More Operating Systems questions
- 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?
- A RAID 5 array of 5 disks loses one disk. During the rebuild, which statement is correct?
- An inode stores the file size, block pointers, permissions, owner and timestamps. Which of these is NOT stored in the inode in a classic…
- A directory has 3 entries named a, b and c that are hard links to the same inode, and the directory itself has 2 subdirectories. What are…