3 - Chapter 9 : Buffer Pool Chapter 9b: Buffer Pool...

Info iconThis preview shows pages 1–4. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 9 : Buffer Pool Chapter 9b: Buffer Pool Management Based partly on Ramakrishnan & Gehrke (text); Silberschatz, et. al (“Operating System Concepts”); 1 & other sources (e.g., UBC database faculty) Buffer Management in a DBMS Page Requests from Higher Levels BUFFER POOL MAIN MEMORY disk page free frame BUFFER POOL 2 ¡ Data must be in RAM for DBMS to operate on it ¡ A table of <frame#, pageid> pairs is maintained. DB DISK choice of frame dictated by page replacement policy When a Page is Requested ... ¡ If requested page is not in buffer pool ¡ If requested page is not in buffer pool: ¢ Choose a frame for replacement ¢ If that frame is dirty, write it to disk ¢ Read requested page into chosen frame ¡ Pin the new page and return its address 3 £ If requests can be predicted (e.g., table or index scans, range searches), pages can be pre-fetched several pages at a time! When a Page is Requested … (cont.) ¡ Requestor of page must unpin it, and indicate whether the page has been modified: whether the page has been modified: ¢ Maintain a dirty bit for the page ¡ Page may be requested many times ¢ Maintain a pin count ¢ A page is a candidate for replacement iff pin count = 0 4 ¡ CC & recovery may entail additional I/O when a frame is chosen for replacement ¢ e.g., Write-Ahead Log protocol Handling the Buffer Pool (when Using the ARIES Algorithm) ¡ (see page 586 of text) ¡ Force: At transaction commit time, first write the log record to disk, then write the transaction’s...
View Full Document

This note was uploaded on 09/21/2009 for the course CS cs taught by Professor Cs during the Spring '09 term at University of the Bío-Bío.

Page1 / 8

3 - Chapter 9 : Buffer Pool Chapter 9b: Buffer Pool...

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

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