Virtual Memory
Benefits of loading only a portion of a program's pages into memory:
- Programs could be written for a much larger address space (virtual memory space) than physically exists on the computer. Loading all the page will crash the program, so if we decide to load only some pages at a time, the program could successfully execute.
- Because each program is only using a fraction of their total address space, there is more memory left for other programs, improving CPU utilization and system throughput.
- Less time is needed for swapping programs in and out of RAM during context switches.
The figure on the following slide shows the general layout of virtual memory.