The LRU/TCH Algorithm

So we have linked lists of buffer headers, and each buffer header points to a buffer, and each buffer holds a copy of a block. What we need now is an algorithm for deciding which buffer to over-write if we need to read a new block into memory. The algorithm that Oracle uses is a modified LRU (least recently used) with touch count (TCH).

images Note In the following pages, I really ought to talk about things like “. . . the block held by the buffer pointed to by the buffer header that . . .” but this would make the wording very clumsy. A common practice, and one I shall adopt, is to say “the buffer” when you really mean “the buffer ...

Get Oracle Core: Essential Internals for DBAs and Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.