Skip to content

BufferPool

Qian(Christina) Wang edited this page Oct 31, 2016 · 3 revisions

Pin_Count: The number of times that the page currently in a given frame has been requested but not released-the number of current users of the page--isrecorded in the pin_count variable for that frame. Dirty: Since the page have been brought in the bufferpool whether it have been modified

If existed in buffer pool: return

If not in buffer pool:

  1. choose a replacement frame(using replacement policy) and +pin_count
  2. if the chosen replacement frame is dirty, write back to disk
  3. reads the requested page into frame.
  4. Returns the** (main memory) **address of the frame containing the requested page to the requestor.

The locking protocol ensures that each transaction obtains a shared or exclusive lock before requesting a page to read or modify.

Clone this wiki locally