Disk Buffer
Hard Drive Recovery - Disk Buffer
Disk buffer refers to the embedded memory in a hard drive. It acts as the temporary storage between the computer and the physical hard disk platter. It is often confused with page cache kept by the operating system in the computer’s main memory, but they have significant differences.
The disk buffer is controlled by the microcontroller in the hard disk drive whereas the page cache is controlled by the computer to which that disk is attached. Another difference between the two is that disk buffer is small in size, from 2 to 32 MiB, whereas page cache is much bigger because it uses all the unused physical memory. Data in the page cache is often reused several times, but the data in the disk buffer is used rarely.
When writing data to a disk, it has to be written on certain position on the disk. For this the disk read/write head needs to be moved to or near the correct track. After some settling time the read head begins to pick up bits. Usually, the first sectors to be read are not the ones that have been requested by the operating system. The disk’s embedded computer typically saves these unrequested sectors in the disk buffer, in case the operating system requests them later.
Disk buffer is also used to store the data that comes from the disk, before it is sent to the computer, or to store the data that comes from the computer before it can be written to the disk. Another application of disk buffer comes during command queuing. Disk buffer helps the hard disk to store the commands and reorder them.


