LRU-K485

LRU-K485 - LRU-K Page Replacement Algorithm CSCI 485...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: LRU-K Page Replacement Algorithm CSCI 485 Lecture notes Instructor: Prof. Shahram Ghandeharizadeh. Outline History Motivation for LRU-K Alternatives to LRU-K LRU-K Design and implementation Conclusion History LRU-K is attributed to Elizabeth J. ONeil, Patrick E. ONeil, and Gerhard Weikum: The LRU-K Page Replacement Algorithm for Database Disk Buffering, ACM SIGMOD 1993, Washington D.C., page 297-306. Least Recently Used (LRU) When a new buffer page is needed, the buffer pool manager drops the page from buffer that has not been accessed for the longest time. Originally for patterns of use in instruction logic (Denning 1968). Limitation: Decides what page to drop from buffer based on too little information (time of last reference). Pseudo-code for LRU LRU (page p) If p is in the buffer then LAST(p) = current time; Else i) Min = current time + 1; ii) For all pages q in the buffer do a) If (LAST(q) < min) victim = q Min = LAST(q) iii) If victim is dirty then flush it to disk Example 1: LRU Limitation Consider a non-clustered, primary B-tree index on the SS# attribute of the Employee table. t(Emp) = 20,000 P(Emp) = 10,000 (2 records per disk page) lp(I, Emp) = 100 Workload: queries that retrieve Emp records using exact match predicates using SS# attribute, e.g., SS#=940-98-7555 If the B-tree is one-level deep (root-node, followed by the 100 leaf pages), pattern of access is: Ir, I1, D1, Ir, I2, D2, Ir, I3, D3, . Assume your workload consists of 101 frames, what is the ideal way to assign leaf pages and data pages to these frames? What will LRU do?...
View Full Document

This note was uploaded on 01/11/2009 for the course CSCI 485 taught by Professor Ghandeharizadeh during the Fall '08 term at USC.

Page1 / 29

LRU-K485 - LRU-K Page Replacement Algorithm CSCI 485...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online