Understanding the Linux Virtual Memory Manager

Peter Kitson

ISBN : 0131453483

Order a printed copy of this book from Amazon.

Cover Design - Understanding the Linux Virtual Memory Manager

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)



Sample Chapter From Understanding the Linux Virtual Memory Manager
     Copyright © Mel Gorman


Linux is a relatively new operating system that has begun to enjoy a lot of attention from the business, academic and free software worlds. As the operating system matures, its feature set, capabilities and performance grow, but so, out of necessity does its size and complexity. Table 1.1 shows the size of the kernel source code in bytes and lines of code of the mm/ part of the kernel tree. This size does not include the machine-dependent code or any of the buffer management code and does not even pretend to be an accurate metric for complexity, but it still serves as a small indicator.
Version  Release Date Total Size Size of mm/ Line Count
1.0 March 13, 1992  5.9MiB 96KiB 3,109
1.2.13 February 8, 1995 11MiB 136KiB 4,531
2.0.39 January 9, 2001 35MiB 204KiB 6,792
2.2.22 September 16, 2002 93MiB 292KiB 9,554
2.4.22 August 25, 2003 181MiB 436KiB 15,724
2.6.0-test4 August 22, 2003 261MiB 604KiB 21,714
Table 1.1. Kernel Size as an Indicator of Complexity

Out of habit, open source developers tell new developers with questions to refer directly to the source with the “polite” acronym RTFS1, or refer them to the kernel newbies mailing list (http://www.kernelnewbies.org). With the Linux VM manager, this used to be a suitable response because the time required to understand the VM could be measured in weeks. Moreover, the books available devoted enough time to the memory management chapters to make the relatively small amount of code easy to navigate.

The books that describe the operating system such as Understanding the Linux Kernel [BC00] [BC03] tend to cover the entire kernel rather than one topic with the notable exception of device drivers [RC01]. These books, particularly Understanding the Linux Kernel, provide invaluable insight into kernel internals, but they miss the details that are specific to the VM and not of general interest. But the book you are holding details why ZONE NORMAL is exactly 896MiB and exactly how per-cpu caches