CS432/433

Assignment 1

Buffer Manager

Deadline : Sept. 24 1997 (CS432)
 

Introduction

In this assignment you will need to implement a buffer manager. The buffer manager is responsible for bringing pages from the disk to the main memory as needed. The buffer manager: In addition, you will be required to run experiments studying the effect the size of the buffer pool has on performance and present your results.

Description and Specifications

You will be given the code that implements a database class (DB) and a page class (Page). The definition of public interface for the buffer manager class (BufMgr) is available, but is not implemented. You can find out more about the implemented classes and types here : Also, you'll be given a visualization tool, "BufferSim",  which simulates buffer manager operations.

The source code for the project is located in the directory \\goose\courses\Cs432\Proj1. The directory contains:

You are required to modify and fill in the gaps in bufmgr.cpp and bufmgr.h, specifically :

Presenting Statistical Data:

       1) After your tests have run successfully, you will need to run some experiments while varying the buffer size, and describe the effects a larger buffer pool has on the statistics (including time) that you have collected. You should also explain these variations.
        2) Running the experiments is basically running the tests provided for you again with different buffer sizes. At this point you should also look at the test procedures and see why the buffer size increases will affect the performance.  (note: we are only interested in statistics relating to the fourth and fifth tests.)
        3) In order to change the buffer size go to the file minirel.h and change the value of the constant NUMBUF. The buffer sizes recommended are 50,100,150,200, and 250. (Note: The project you submit should have buffer size 50 only. We don't want five copies of everybody's project)
        4) Remember to close all major applications on your computer before running the tests, since they will affect the time it takes to run the tests.
 
**CS 433 students only**
    CS433 students are required to implement the MRU replacement policy as well. This policy is described in the text. They are also required to present statistical data that describes its performance with varying buffer sizes. (in the same manner as that of the Clock replacement policy). You should then contrast these results with those received for the Clock  replacement policy. Remember that if you define the replacement policy as a base class with virtual functions then all you have to do is derive the MRU class and implement the functions using the MRU algorithm. This will involve minimum change in your buffer manager code.
    This section of the assignment is due on October 1, 1997 5:00 pm. No late submissions will be accepted.

Coding Convention

You need to follow certain coding convention for all your assignments.

Submission Procedure

How to hand in: You should remember to keep a copy of the project in your own account.

This assignment is due on  Sept. 24 1997, 5:00 pm for CS432, and Oct. 1 1997, 5:00pm for CS433. No late submission will be accepted.

Marking Criteria

We will mark your programs based on the following criteria :
Correctness (65%)
You will get full marks if your implementation is correct. Partial credit will be given to a partially correct submission.
Coding Style (15%)
We expect you to write neat code. Code should be nicely indented and commented. We also expect you to follow the coding conventions.
Statistical Analysis (10%)
        You should clearly describe what effects a larger buffer pool has on performance and why. You should use the statistics you collect to support your reasoning.
Documentation (10%)
You should also submit the online copy of your documentation using any format you like. (WordPerfect, MS Word, HTML etc.), explaining the code that you have written. This should include assumptions that you made, description of any new class that you have added, and any other special feature we should take note of. As a guideline, the document should be 2-3 pages long (with normal fonts and spacing), or more if you feel necessary.

Collaboration

Project will be done in team of two (you must stick with the same team for the rest of the semester). Both or none of  the team members should be in cs433.

Both team members will receive the same grade. Also, collaboration across teams is not allowed, beyond discussing broad logical ideas (eg. how does the clock algorithm work?) and C++ doubts (e.g.. how does one initialize static variables?). Looking at the code from another team is also not allowed. In any situation where a team feels that it may have compromised one of these guidelines, the right thing to do is to state the details along with the project submission.

Miscellaneous

Please let us know if there is any ambiguity in the assignment and please report any possible bugs as soon as possible by  mailing a TA .

There are now two newsgroups for the class : cornell.class.cs432 and cornell.class.cs433, for general discussions. Please used cornell.class.cs432 for discussion for this assignment.

Please check this page frequently for any updates or clarification.