This directory includes several C++ files that define a C++ 
interface (a wrapper) to the disk simulator. One important
data structure is tRequestPacket defined in general.H.
When an application needs send a request to a disk,
it fills a RequestPacket with the necessary information
such as the Block Number and the request size. It then
passes the packet to the C++ simulator interface, which
in turn breaks the request packet and calls the 
simulator. When the request finishes, the wrapper fills
a RequestPacket with the original values provided by the 
caller, together with some extra information such as the physical
start time and stop time, and passes the data back to the
caller in a callback function.

The diskmodel.H and diskmodel.C files define two disk 
interfaces, one is a "standard" disk and the other a disk
with a built-in queue. It also contains a user event handler
class that processes some "basic" user envets such as 
EVENT_DISKDONE. An user program can simply sub-class 
the event-handler and add the code to process newly-defined
events. 

The test1disk.C is a sample program which simulates a single disk.

The test2disk.C is a sample program that simulates two disks 
simultaneously.

You can compile the programs using the Make file, and
go to the ../bin directory to run the binaries. To compile
the programs here, you must have the disk simulator library
ready. Go to the ../libsrc program and type "make" to compile
the library.

Many programs in this directory are used in our Disk Caching Disk
(DCD) simulator. I've deleted many applicaion-specific parts to make
the code clean and easy to understand. However there are still 
some excessive fat left.


-Yiming
 
