Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The previous discussion of the memory layout of a process glossed over the fact that we were talking about the layout in virtual memory. Since an understanding of virtual memory is useful later on when we look at topics such as the fork() system call, shared memory, and mapped files, we now consider some of the details.
Like most modern kernels, Linux employs a technique known as virtual memory management. The aim of this technique is to make efficient use of both the CPU and RAM (physical memory) by exploiting a property that is typical of most programs: locality of reference. Most programs demonstrate two kinds of locality: