Questions: Buffer Pool Management and Cache Replacement Policies

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

The buffer pool is full and the replacement policy selects a page to evict. The chosen page's dirty bit is set to 1. What must happen before the frame can be reused?

ANothing extra — the dirty bit just indicates the page was recently accessed, not that it was modified
BThe page must be written back to disk before the frame can be reused, incurring a write I/O
CThe page is discarded immediately since dirty pages are invalid and the disk copy is authoritative
DThe pin count must be decremented to zero before the dirty page can be written
Question 2 Multiple Choice

A database buffer pool is running the clock algorithm. A frame's reference bit is currently 1 when the clock hand reaches it during eviction. What happens?

AThe frame is immediately evicted because it was recently accessed and should be refreshed
BThe reference bit is reset to 0, the clock hand moves on, and the frame gets a 'second chance'
CThe frame's pin count is incremented to protect it from future eviction
DThe frame is promoted to a special 'hot' list that the clock algorithm skips permanently
Question 3 True / False

LRU is the most commonly implemented replacement policy in real database buffer pools because it provides the best performance in most workloads.

TTrue
FFalse
Question 4 True / False

A page with a pin count greater than zero cannot be evicted by any replacement policy, regardless of how long it has been in the buffer pool.

TTrue
FFalse
Question 5 Short Answer

Why does evicting a dirty page cost more than evicting a clean page, and how do database systems reduce this overhead?

Think about your answer, then reveal below.