Chapter 6. Memory Management
We saw in Chapter 2, how Linux takes advantage of Intel's segmentation and paging circuits to translate logical addresses into physical ones. In the same chapter, we mentioned that some portion of RAM is permanently assigned to the kernel and used to store both the kernel code and the static kernel data structures.
The remaining part of the RAM is called dynamic memory. It is a valuable resource, needed not only by the processes but also by the kernel itself. In fact, the performance of the entire system depends on how efficiently dynamic memory is managed. Therefore, all current multitasking operating systems try to optimize the use of dynamic memory, assigning it only when it is needed and freeing it as soon as possible.
This chapter, which consists of three main sections, describes how the kernel allocates dynamic memory for its own use. Section 6.1 and Section 6.2 illustrate two different techniques for handling physically contiguous memory areas, while Section 6.3 illustrates a third technique that handles noncontiguous memory areas.
Get Understanding the Linux Kernel now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.