Hard drive cache of the main three roles: first, read-ahead. Dang hard disk by CPU instruction control began reads data Shi, hard disk Shang of control chip will control head put is reads of cluster of next or several cluster in the of data read to cache in the (due to hard disk Shang data storage Shi is compared continuous of, so reads hits high), dang needs reads next or several cluster in the of data of when, hard disk is not needs again reads data, directly put cache in the of data to memory in the on can has, due to cache of speed far above head read and write of speed, So to be able to achieve the goal of improved performance; the second is the caching of write activity.
Dang hard disk received writes data of instruction zhihou, does not will immediately will data writes to platters Shang, but first temporarily storage in cache in, then sent a "data has writes" of signal to system, then system on will think data has writes, and continues to Executive following of work, and hard disk is in free (not for reads or writes of when) Shi again will cache in the of data writes to platters Shang.
While writing data have some performance boost, but also inevitably brings a security risk – if the data is still in the cache when it suddenly loses power, then these data would be lost. For this problem, HDD manufacturers certainly has the solution: power down, heads turn inertia in the cache writes data to a staging area outside the zero track, wait until the next boot and then writes the data to the destination; and the third function is to temporarily store recently accessed data. In some cases, will often need access to certain data, internal cache will read your hard disk more frequently some of the data stored in the cache, read again you can transfer directly from cache.