0
2.2kviews
What is buffer Cache?
1 Answer
0
13views

The kernel maintains files on mass storage devices such as disks, and it allows processes to store new information or to recall previously stored information. When a process wants to access data from a file, the kernel brings the data into main memory from the disk. The process then can examine it in main memory, alter it, and request that the data be saved in the file system again.

The kernel could read and write directly to and from the disk (secondary storage) for all file system accesses, but response time of system and throughput would be poor because disk transfer rate is too slow. The kernel therefore try to minimise the frequency of disk access by keeping a pool of internal data buffers, called the buffer cache. Buffer cache holds the data of recently used disk blocks.

If the data is already in the cache, the kernel need not to read it from the disk. If the data is not present in the cache, the kernel reads the data from the disk and takes it into cache. It uses an algorithm that tries to save as much good data in the cache as possible. Similarly, the Kernel also performs the disk write operations for further use of same data.

The kernel also try to minimise the frequency of disk write operations by determining whether the data must really be stored on disk or whether it is transient data that will soon be overwritten.

Please log in to add an answer.