Analyzing the variations of page replacement implementations in recent Linux kernel versions of 2.0, 2.2, and 2.4, we compare their abilities to deal with system thrashing. We show that although the page implementation in Kernel 2.2 is relatively effective to protect thrashing among the three versions, none of them have adaptive ability, and thus the protection is limited. By running several groups of memory-intensive application programs on Kernel 2.2, we observe serious thrashing when memory shortage attains a certain level.
We propose and implement a thrashing protection patch in Linux kernels, which makes replacement policy responsively resolve excessive memory paging by temporarily helping one of the active processes quickly build up its working set. Consequently, thrashing could be eliminated at the level of page replacement, so that load controls at a higher level, such as process suspensions/swapping can be avoided or delayed until it is truly necessary. Our experiments show that our patch can significantly reduce page faults and the execution time of each individual thrashing process for several groups of interacting programs. We also show that our method introduces little additional overhead to program executions, and its implementation in Linux (or Unix) system is straightforward.
[1]
Edward G. Coffman,et al.
A study of storage partitioning using a mathematical model of locality
,
1972,
OPSR.
[2]
Rik van Riel.
Page Replacement in Linux 2.4 Memory Management
,
2001,
USENIX Annual Technical Conference, FREENIX Track.
[3]
길아라.
[서평]Linux Kernel Internals(Second Edition)
,
1999
.
[4]
Samuel J. Leffler,et al.
The design and implementation of the 4.3 BSD Unix operating system
,
1991,
Addison-Wesley series in computer science.
[5]
Keith Bostic,et al.
The design and implementa-tion of the 4.4BSD operating system
,
1996
.
[6]
G. G. Stokes.
"J."
,
1890,
The New Yale Book of Quotations.
[7]
Lawrence J. Kenah,et al.
VAX/VMS internals and data structures
,
1984
.
[8]
Scott Maxwell.
Linux Core Kernel Commentary
,
1999
.
[9]
Robert Magnus,et al.
Linux Kernel Internals
,
1996
.