Operating Systems Project 4


The goals of this project are:

  1. to practice benchmarking operating systems

Like all projects in this course, this is an individual or group project, at your choice. If you work in a group, be sure that whoever submits the project cc's all the team members and also lists all the team members' names in the email.

The project is due at any time Wednesday, December 6th 2005 (the last day of classes for this course). As before, please submit your project as a text email.

Project Description

This project requires you to test two things: memory allocation speed, and file read and write speed. The instructor has done much of the work for testing memory allocation speed, you will have to do most of the work for the file reading and writing.

This project has been designed to be done on your Linux system, but if you prefer you may do it on a Windows, Mac, or any combination of systems (that is, you may report results for different systems -- if you do, please clearly separate the results on different systems).

  1. Download, compile, and run the instructor's program, and report the results. If your machine does not have much memory, you may need to change the size that is allocated, or you may make it larger if you wish. Also note that the memory from the last set of allocations (1,000 bytes at a time) is never freed, which would not be satisfactory in a regular program, but is fine for benchmarking.
  2. Exchange the positions of the two calls to malloc (MALLOCSIZE) and calloc, so that calloc executes first. Do you see any difference? Report the results, and if the difference is significant, do your best to explain it.
  3. Now create and write data into a file of size about 100MB (again, you may use a smaller size if that is all that your machine will support). Then remove the file, and then repeat the operation. Report the GB/second of file allocation for the two cases, and again, if the difference is significant, attempt to explain it. You may report different numbers for the file being written to 1,000 bytes at a time vs. a single 100MB write, for example.
  4. Read the file you created, and report the GB/s of this operation. Do so immediately after you created the file, and then again after doing a disk intensive operation, such as running the command
    find . -type f -exec wc {} \;
    
    somewhere where there are lots of files (e.g. the root directory if you are root). Again, attempt to explain any significant differences.

To turn in your program, simply email the instructor the results of each of your measurements, as well as any explanation you may have. Please make these as readable as possible (if desired, you may send a spreadsheet of your results in an attachment).

If you think the results are significantly different but you have no explanation, simply say they are different. Also send any thoughts or comments about the benchmarking or the system you are benchmarking.

You may want to run your benchmarks more than once to see whether they are slower or faster the first time.

For benchmarking file reading and writing, you may modify the instructor's code or write your own.