Chapter 6. Virtual Memory

Table of Contents
What Virtual Memory isn't
What virtual memory is
Pages
Physical Memory
Pages + Frames = Page Tables
Virtual Addresses
Consequences of virtual addresses, pages and page tables
Hardware Support
Linux Specifics

What Virtual Memory isn't

Virtual memory is often naively discussed as a way to extended your RAM by using the hard drive as extra, slower, system memory. That is, once your system runs out of memory, it flows over onto the hard drive which is used as "virtual" memory.

In modern operating systems, this is commonly referred to as swap space, because unused parts of memory as swapped out to disk to free up main memory (remember, programs can only execute from main memory).

Indeed, the ability to swap out memory to disk is an important part of how virtual memory works, but as you will see it is not the purpose of virtual memory, but rather a very useful side effect!