CS FundamentalsHardGATE CS
A process reads a file sequentially, and the OS detects this. Which buffer-cache policy is most appropriate?
- A. Strict LRU for the file's pages
- B. Disable caching for all other files
- C. Write-through for reads
- D. Read-ahead plus free-behind (drop pages just used), since they will not be reused soon
Correct answer: D. Read-ahead plus free-behind (drop pages just used), since they will not be reused soon
For a sequential stream, prefetching hides disk latency, and recently used pages are the least likely to be needed again, so LRU is the wrong choice; free-behind (or MRU-like) avoids polluting the cache.
More Operating Systems questions
- 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?
- 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…