Tuesday, January 03, 2006

Page Buffers and Idents

Pages are the logical view of a page however to abstract the page implementation from the persistence logic the concept of Page Buffers was created.

Page Buffers are the device-level view of pages. These objects track where they point to both in terms of a virtual ID and a logical ID.

Virtual Page ID - Contains the unique device ID (unique to a given database that is) and the physical page ID (which ranges from 0 to the number of pages allocated on the device).

Logical Page ID - Provides an abstraction for the virtual page ID to ease the task of moving pages.

The page cache (which incidentally is implemented as a device class) also contains the implementation of the Free Buffer manager (which ensures we always have a ready supply of buffer objects when we need them), the Read Manager (which will be expanded to incorporate the Read Ahead manager), and the Lazy Writer. The Lazy-Writer also deals with check-pointing - under these conditions extra threads are spawned to write all dirty cache pages to disk as quickly as possible.

No comments: