Skip to content
An implementation of a Buffer Pool Manager in Python.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Implementing a Buffer Pool Manager prototype in Python

Inspired from CMU 15-445/645:

Submitted as programming project for Database Management Systems course at BML Munjal University to Dr. Brij Bihari Dubey and Dr. Rajesh Yadav.

Structure of Code


    • Consists of a 'kinda' stub implementation of a page with necessary functions.
    • A page consists of an index, a randomly generated UUID, a state variable ('REFERENCED', 'AVAILABLE' or 'PINNED'), and a boolean to check if the page is 'dirty' (Changed in memory), pin count.
    • Methods to increment and decrement number of pins, to get pin count and to check if the page is dirty.

    • STUB implemetations of all methods needed in a Disk Manager to implement a buffer pool manager. Nothing to see there.

    • Abstract class with all methods a valid replacement policy must implement. These methods are: 'insert', 'victim', 'replace', 'length'

    • Implementaion of Least Recently Used (LRU) replacement policy.
    • Uses a circular queue to find the least recently used page.

    • Real FUN is here !!!
    • Methods to create, fetch, delete, pin / unpin pages.
You can’t perform that action at this time.