CS357: Database System Implementation
Homework Assignment 3 -- Disk and Memory Management


Given: Wednesday, 6 February
Due Date: Wednesday, 13 February

The SimpleDB buffer manager is grossly inefficient in two ways:
I would like you to modify the buffer manager to fix these problems.  You are free to change (or rewrite) any of the files in the package simpledb.buffer, in any way that you like.  Think about what makes sense to do.  My solution modifies the classes Buffer, BasicBufferMgr, and BufferMgr.  However, I want to point out that the number of lines of code did not change much, which means that you don't need to do a lot of coding to get this to work.

In order to get you started and to keep you from doing something weird, here are some guidelines to adhere to:
You also must write a test program.  The program should demonstrate that the buffers are really allocated using LRU, by doing judicious pinning and unpinning.  Note that the call to SimpleDB.init causes the buffers to get used, so your test program won't be able to start from a clean slate.

Hand in a printout of all files you wrote code for (including the test program), as well as a printout of the output of the test program.  If you have any kind of Java-related problem, please see me early or ask questions in class.