A method and apparatus to improve the read/write performance of a hard
drive is presented. The hard drive includes solid state, non-volatile
(NV) memory as a read/write cache. Data specified by the operating system
is stored in the NV memory. The operating system provides a list of data
to be put in NV memory. The data includes data to be pinned in NV memory
and data that is dynamic. Pinned data persists in NV memory until the
operating system commands it to be flushed. Dynamic data can be flushed
by the hard drive controller. Data sent by an application for storage is
temporary stored in NV memory in data blocks until the operating system
commits it to the disk.