Chapter 4. Virtual Process Memory
The virtual address space of userland processes is an important abstraction of Linux: It allows the same view of the system to each running process, and this makes it possible for multiple processes to run simultaneously without interfering with the memory contents of the others. Additionally, it allows various advanced programming techniques like memory mappings. In this chapter, I will discuss how these concepts are realized in the kernel. This also requires an examination of the connection between page frames of the available physical RAM and pages in all virtual process address spaces: The reverse mapping technique helps to track which virtual pages are backed by which physical page, and page fault handling allows filling the virtual address space with data from block devices on demand.
All the memory management methods discussed in the preceding chapter were concerned either with the organization of physical memory or management of the virtual kernel address space. This section examines the methods required by the kernel to manage the virtual user address space. For a variety of reasons, some of which are given below, this is more complex than managing kernel address space:
Each application has its own address space that is segregated from all other applications.
Usually only a few sections of the large linear address space available to each userspace process are actually used, and they may also be some distance from each other. The ...