Check out the new USENIX Web site. next up previous
Next: Why an adaptive replacement Up: Variations of Page Replacement Previous: Kernel 2.2

Kernel 2.4

The latest Linux kernel is version 2.4, which makes considerable changes in the paging strategy. Many of these changes target at addressing concerns on memory performance that arises in Kernel 2.2. For example, without page aging, NRU replacement in Kernel 2.2 can not accurately distinguish the working set from incidentally accessed pages. Thus, Kernel 2.4 has to reintroduce page aging, just as Kernel 2.0 and FreeBSD do. However, the page aging could help processes with high page fault rates to keep their working sets, causing other processes to have serious page fault rate at the same time, and trigger thrashing. In kernel 2.4, the ``age" variable in each page is decremented exponentially (the variable is divided by 2 instead of subtracting a constant value) when an unaccessed page is identified, which may be slightly beneficial to the thrashing protection compared with kernel 2.0.

To make memory more efficiently utilized, Kernel 2.4 reintroduces the method used in Kernel 2.0 for selecting processes to contribute NRU pages (see Figure 3). Going through a process list each time, it walks only about 6% of the address space in each process to search NRU pages before it goes to the next process. Similar to that of Kernel 2.0, this method increases its possibility of thrashing. However, before identifying a process in the list, Kernel 2.4 first takes an extra NRU search of about 6% of the address space of the process that is allocating memory to penalize it, which is the process encountering page faults in heavy memory load. This arrangement is only slightly helpful to prevent thrashing.

Figure 3: Selecting NRU pages in Linux Kernel 2.4.
\begin{figure}\centering \centerline{\psfig{figure=fc2.4.eps,width=2.0in,height=2.0in}} \end{figure}

Kernel 2.4 distinguishes the pages with age of zero and those with positive ages by separating them into non-active and active lists, respectively to prevent inefficient interactions between page aging and page flushing [9]. The NRU pages with reference bit zeros possibly have positive ages, and are moved to the active list, where page aging is conducted. This change does not help protect the system against thrashing, because the system still has no knowledge on which particular working sets of the processes should be protected when frequent page replacement takes place under heavy memory workload. Similar argument can be applied in BSD and FreeBSD, where a system-wide list of pages forces all processes to compete for memory on an equal basis.


next up previous
Next: Why an adaptive replacement Up: Variations of Page Replacement Previous: Kernel 2.2
Song Jiang 2001-09-09