In computing, page cache, sometimes ambiguously called disk cache, is a transparent cache of disk-backed pages kept in main memory (RAM) by the operating system for quicker access. Page cache is typically implemented in kernels with the paging memory management, and is completely transparent to applications. All memory that is not directly allocated to applications, is usually utilized for page cache. Hard disk read speeds are low and random accesses require expensive disk seeks compared to main memory—this is why RAM upgrades usually yield significant improvements in computers' speed and responsiveness Separate disk caching is provided on the hardware side, by dedicated RAM or NVRAM chips located either in disk controller or in a disk array controller. Such memory should not be confused with page cache.
=====================
Th e page cache also aids in writing to a disk. Pages that have been modified in memory for writing to disk, are marked "dirty" and have to be flushed to disk before they can be freed. When a file write occurs, the page backing the particular block is looked up. If it is already found in cache, the write is done to that page in memory. Otherwise, when the write perfectly falls on page size boundaries, the page is not even read from disk, but allocated and immediately marked dirty. Otherwise, the page(s) are fetched from disk and requested modifications are done.
However, not all cached pages can be written to — often, program code is mapped as read-only or copy-on-write; in the latter case, modifications to code will only be visible to the process itself and will not be written to disk.
Answered by:
Point
at
8:30 AM on July 04, 2008
|
Point's Q&A
|
Report Abuse
Rate this : 00