The filesystem buffer cache does both buffering and caching. Describe why buffering is
needed. Describe how buffering can improve performance (potentially to the detriment of file
system robustness). Describe how the caching component of the buffer cache improves
performance
Answer:
-Buffering is required in order to ensure that performance is not degraded as a file is sequentially read orwritten to, perhaps from different parts of the physical disk, since a large number of the disk reads occur before the file is actually “read” by the user (or in the case of writes, the data is flushed to disk long after individual “writes” occur). This minimises expensive disk I/O operations, because I/O occurs in sequential bursts, but possibly at the detriment of robustness – for example if a power failure occurs, the
buffer cache is lost, and its contents were not written to disk. The caching component improves
performance still, by storing frequently used parts of files in fast memory, minimising lengthy disk access
times.