2021-10-28 by Kamen

This is the final project for CS-GY 6233 2021 Fall ****and it is by its very nature quite open ended. Some of the ground rules that you are used to from homework do apply though:

The environment for this project is real Linux (I recommend a recent Ubuntu, but really any recent distribution should work). You can use C or C++.

<aside> 💡 You can try to make it work on xv6 for extra credit... but you cannot exclusively use xv6. We have discussed in class that the biggest file xv6 can handle is 70KB. This will not be an interesting size to do all this assignment requires.

</aside>

The final project is 35% of your total grade. I will use discretion when grading it on what deserves [extra] credit. I will provide examples below. If you want to excel at this project you should consider some of the extra credits and possibly come up with more ideas of your own!

Goal

The project is centered around performance.

We will try to get disk I/O as fast as possible and evaluate the effects of caches and the cost of system calls. In the end you should have a good understanding of what sits in the way between your process requesting data from disk and receiving it.

Breakdown

1. Basics

Way to execute: ./run <filename> [-r|-w] <block_size> <block_count>

2. Measurement

When measuring things it helps if they run for "reasonable" time. It is hard to measure things that run too fast as you need high-precision clocks and a lot of other things can affect the measurement. It is also annoying to wait for a long time for an experiment, especially if you have to do many experiments. For this reason you should make sure that your experiments take "reasonable" time. I recommend something between 5 and 15 seconds.

<aside> 💡 Hint: You can start with a small file size and use your program from (1) above to read it and measure the time it takes. You can keep doubling your file size until you get between 5 and 15 seconds.

</aside>

Extra credit idea: learn about the dd program in Linux and see how your program's performance compares to it!