Section 8.6. Physical Memory Management: Paging and Swapping


8.6. Physical Memory Management: Paging and Swapping

It is possible to have more virtual address space than physical address space because the operating system can overflow memory onto a slower medium, such as a disk. The slower medium in UNIX is known as swap space. Two basic types of memory management manage the allocation and migration of physical pages of memory to and from swap space: swapping and demand paging.

The swapping algorithm for memory management uses a user process as the basic unit for managing memory. If there is a shortage of memory, then all of the pages of memory of the least-active processes are swapped out to the swap device, freeing memory for other processes. This method is easy to implement, but performance suffers badly during a memory shortage because a process cannot resume execution until all of its pages have been brought back from secondary storage. The demand-paged model uses a page as the granularity for memory management. Rather than swapping out a whole process, the memory system just swaps out small, least-used chunks, allowing processes to continue while an inactive part of the process is swapped out.

The Solaris kernel uses a combined demand-paged and swapping model. Demand paging is used under normal circumstances, and swapping is used only as a last resort when the system is desperate for memory. We cover swapping and paging in more detail in Section 10.3.




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