An optimality proof of the LRU-K page replacement algorithm

被引:61
作者
O'Neil, EJ
O'Neil, PE
Weikum, G
机构
[1] Univ Massachusetts, Dept Comp Sci, Boston, MA 02125 USA
[2] Univ Saarland, Dept Comp Sci, D-66041 Saarbrucken, Germany
关键词
buffering; LRU; LRU-K; optimality; page-replacement;
D O I
10.1145/300515.300518
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
This paper analyzes a recently published algorithm for page replacement in hierarchical paged memory systems [O'Neil et al. 1993]. The algorithm is called the LRU-K method, and reduces to the well-known LRU (Least Recently Used) method for K = 1. Previous work [O'Neil et al. 1993; Weikum ct al. 1994; Johnson and Shasha 1994] has shown the effectiveness for K > 1 by simulation, especially in the most common case of K = 2. The basic idea in LRU-K is to keep track of the times of the last K references to memory pages, and to use this statistical information to rank-order the pages as to their expected future behavior. Based on this the page replacement policy decision is made: which memory-resident page to replace when a newly accessed page must be read into memory. In the current paper, we prove, under the assumptions of the independent reference model, that LRU-K is optimal. Specifically we show: given the times of the (up to)K most recent references to each disk page, no other algorithm A making decisions to keep pages in a memory buffer holding n - 1 pages based on this information can improve on the expected number of I/Os to access pages over the LRU-K algorithm using a memory buffer holding n pages. The proof uses the Bayesian formula to relate the space of actual page probabilities of the model to the space of observable page numbers on which the replacement decision is actually made.
引用
收藏
页码:92 / 112
页数:21
相关论文
共 13 条
[1]   PRINCIPLES OF OPTIMAL PAGE REPLACEMENT [J].
AHO, AV ;
DENNING, PJ ;
ULLMAN, JD .
JOURNAL OF THE ACM, 1971, 18 (01) :80-&
[2]  
[Anonymous], 1970, Basic Concepts of Probability and Statistics
[3]   A STUDY OF REPLACEMENT ALGORITHMS FOR A VIRTUAL-STORAGE COMPUTER [J].
BELADY, LA .
IBM SYSTEMS JOURNAL, 1966, 5 (02) :78-&
[4]  
Berry DA, 1990, STAT THEORY METHODS
[5]  
Coffman Edward Grady, 1973, Operating Systems Theory
[6]   WORKING SET MODEL FOR PROGRAM BEHAVIOR [J].
DENNING, PJ .
COMMUNICATIONS OF THE ACM, 1968, 11 (05) :323-&
[7]   PRINCIPLES OF DATABASE BUFFER MANAGEMENT [J].
EFFELSBERG, W ;
HAERDER, T .
ACM TRANSACTIONS ON DATABASE SYSTEMS, 1984, 9 (04) :560-595
[8]  
Gray J., 1987, P ASS COMP MACH SPEC, P395
[9]  
Koutsoupias E., 1994, Proceedings. 35th Annual Symposium on Foundations of Computer Science (Cat. No.94CH35717), P394, DOI 10.1109/SFCS.1994.365677
[10]  
ONEIL EJ, 1993, P ACM SIGMOD INT C M, P297