[prev] 4 [next]

Buffer Pool

Buffer operations:   (all take single PageId argument)
  • request_page(pid),   release_page(pid), ...
Buffer pool data structures:
  • Page frames[NBUFS];   FrameData directory[NBUFS];
  • Page is byte[BUFSIZE],   FrameData is struct {...}
For each frame, we need to know:   (FrameData)
  • which Page (i.e. PageId = (RelId,PageNum)) it contains, or empty/free
  • whether it has been modified since loading (dirty bit)
  • how many transactions are currently using it (pin count)
  • time-stamp for most recent access (assists with replacement)