Project 3: I/O Cache Emulator

The goal of the project is to develop a user-level IO cache emulator to investigate the impact of admission and eviction policies. To this end, you need 1GB of storage to represent your main storage. Moreover, you need to create a ramdisk as the I/O cache, with a maximum size of 64MB RAM. Your code will receive a set of accesses (trace file) and emulate I/O operations for each line of trace by reading from and writing to a file. Assume that each line of the input trace has the following format:

128166410318061256,wdev,3,Write,3156835840,4096,933

Where the elements represents:

timestamp, workload name, workload name, access type(read/write), address, size, offset

For each line, perform a read/write on a file at the address, with the size of the request. As mentioned above, the size of your main storage is 1GB, so first divide the address by 4096, and then take modulo (mod) of the address to the size of storage (1GB). You can ignore the other elements. Assume that the size of each cache block is 4KB. Each line of the input trace represents one I/O request.

You should provide a report with the following stats:

Testing

Considerations

Back to top