How does the Linux page cache improve filesystem read/write performance, and what is the significance of commands like "sync" or the "fsync()" system call?
Correct! Well done.
Incorrect.
The correct answer is A) The page cache stores recently used disk blocks in RAM so reads come from memory, and writes are often buffered as "dirty" pages before flushing; "sync" and "fsync()" force pending writes to disk, important for durability before shutdown
Correct Answer
The page cache stores recently used disk blocks in RAM so reads come from memory, and writes are often buffered as "dirty" pages before flushing; "sync" and "fsync()" force pending writes to disk, important for durability before shutdown
Without understanding the page cache, one might assume "free -h" showing low "free" memory indicates a problem — much of that memory is actually cache that can be reclaimed; "sync"/"fsync" matter for ensuring data durability since writes may otherwise sit in memory ("dirty" pages) for a while before being flushed.