Introduction to Swapping: Mechanisms

Get a brief introduction to the crux of this chapter in this lesson!

Thus far, we’ve assumed that an address space is unrealistically small and fits into physical memory. In fact, we’ve been assuming that every address space of every running process fits into memory. We will now relax these big assumptions, and assume that we wish to support many concurrently-running large address spaces.

To do so, we require an additional level in the memory hierarchy. Thus far, we have assumed that all pages reside in physical memory. However, to support large address spaces, the OS will need a place to stash away portions of address spaces that currently aren’t in great demand. In general, the characteristics of such a location are that it should have more capacity than memory. As a result, it is generally slower (if it were faster, we would just use it as memory, no?). In modern systems, this role is usually served by a hard disk drive. Thus, in our memory hierarchy, big and slow hard drives sit at the bottom, with memory just above. And thus we arrive at the crux of the problem:


How can the OS make use of a larger, slower device to transparently provide the illusion of a large virtual address space?

Get hands-on with 1200+ tech skills courses.