Section 8.4. Pages: Basic Units of Physical Memory


8.4. Pages: Basic Units of Physical Memory

Physical memory (RAM) is divided into fixed-sized pieces called pages. The size of a page can vary across different platforms; the common size for a page of memory on an UltraSPARC Solaris system is 8 Kbytes. Each page of physical memory is associated with a file and offset; the file and offset identify the backing store for the page. The backing store is the location to which the physical page contents will be migrated (known as a page-out) should the page need to be taken for another use; it's also the location from which the file will be read back if it's migrated in (known as a page-in). Pages used for regular process heap and stack, known as anonymous memory, have the swap file as their backing store. A page can also be a cache of a page-size piece of a regular file. In that case, the backing store is simply the file it's cachingthis is how the Solaris OS uses the memory system to cache files.

If the virtual memory system needs to take a dirty page (a page that has had its contents modified), its contents are migrated to the backing store. Anonymous memory is paged out to the swap device when the page is freed. If a file page needs to be freed and the page-size piece of the file hasn't been modified, then the page can simply be freed; if the piece has been modified, then it is first written back out to the file (the backing store in this case), then freed.




SolarisT Internals. Solaris 10 and OpenSolaris Kernel Architecture
Solaris Internals: Solaris 10 and OpenSolaris Kernel Architecture (2nd Edition)
ISBN: 0131482092
EAN: 2147483647
Year: 2004
Pages: 244

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net