Building and Using IOLIB

Christian Convey, cjc@cs.brown.edu, Sept. 3, 2002.
 

Building IOLIB

I  haven't done much with Makefiles before, so my approaches may be pretty unorthodox. If something looks done strangely to you, don't immediately assume I had a good reason for doing it in a non-standard way.
  1. Untar the source code. The top-level directory produced by the tarfile is "sm/". We'll refer to the parent directory of "sm/" as tar-directory.
  2. Edit the file tar-directory/sm/src/makedefs.mk, as follows:
  3. cd to tar-directory/sm/src
  4. run make
If all goes well, you should see the directory tar-directory/bin/ populated with valid symbolic links to a set of test/benchmark programs.
 

Tools versions

I've only tried building this in my local environment, which has the following relevant versions:

Packages

I did choose to break the code into "packages", to keep the complexity of code from getting overwhelming. The packages are as follows:

Directory Structure

Like I said earlier - I may have done some things oddly out of ignorance. There's nothing sacred about how I approached this.
 

The API

There are two useful interfaces into the IOLIB, depending on whether or not you want to deal with an asynchronous interface.
 

PageDir

If you want just a simple synchronous interface where you have to be cautious about what kinds of concurrency you cause, use the class tar-directory/sm/src/iolib/int_include/PageDir.H. The file is in the int_include directory because I don't presently consider it to be part of the exposed API from the iolib package. However, to make it exposed, here are the steps:
  1. Move it from the tar-directory/sm/src/iolib/int_include/ directory to the tar-directory/sm/src/iolib/include/ directory.
  2. Modify all of the #include commands in the project's .H / .C files that expect the file to be in its old directory, to instead get it in the new directory.
  3. Add a symbolic link to the file, in the directory tar-directory/sm/include/.
To see how to use the PageDir class, read its .H file and examine the source code of its unit test program.
 

AsynchPageDir

This class adds several bits of functionality on top of PageDir, which I thought would be well suited to supporting the buffer cache: Of course, since I never implemented the pieces of software that would actually use the AsynchPageDir, it remains unproven that the AsynchPageDir's complexity is even needed. Perhaps the PageDir class is all that the rest of the Storage Manager needs for its disk I/O.

To see how to use the AsynchPageDir class, read its .H file and examine the source code of its unit test / benchmark programs.