Programming Project Number 1 - System Performance Measurements

Due date: Start of class, Wednesday 6 February, 2008

Project Goals

The goal of this assignment is to perform several performance measurements to characterize the relative overhead associated with systems calls (Mode switch and kernel processing), thread creation, process creation, context switches and the memory subsystem.

Programming requirements

You will have to write several different programs using the C programming language and targeted for the Linux environment. These programs must perform the experiments described below. Of course, I expect you to reuse as much software as possible but I do expect four different executables. One each for measuring the overhead associated with performing a system call, creating a process, performing context switches and detecting memory cache boundaries (L1 and L2). For each of the three required programs, I provide an example command line (shown using the -h or help option) and summarize the required processing steps below:

Required Output

As in project 1, for all but the memory cache test you must report the average, maximum, minimum, standard deviation and standard error of the measured values. For simplicity you can use the same statistics code you used in project 1. Make sure you collect a sufficient number of samples to get reasonable results.

Supporting Documentation

When submitting your assignment include documentation describing your benchmarks, behavior you expected, behavior you observed (or measured) and a description of the experiment goals (why you chose the particular mechanisms you used). When you turn in your assignment it should include:

  1. A summary of the status of your program (e.g., limitations, test failures) and documentation. State explicitly if the program is bug free or not. If not, what do you believe is wrong with it and how could it be fixed.
  2. Provide a brief overview of each file.
  3. A brief analysis of what your program is measuring or what features of the operating system/kernel are being exercised. What was your experiment designed to measure. That is, did you account for overhead due to system calls, synchronization objects, data movement or scheduling.
  4. How you measured elapsed time. Did you use gettimeofday (3) the Pentium cyclecounter or some other utility. Did you measure elapsed time for one sample or for some fixed number of samples. Did you have to worry about the clock resolution?
  5. What about the data and instruction cache. Was this an issue? How did you account for it?
  6. Was there any other system activity that could explain unexpected results?
  7. Did you collect enough samples. For example, if you have a sample space of 1, this needs explaining. However, 1000 doesn't.
  8. Do your results make sense! Did you get the results you expected? If not, present possible explanations?

What to Turn In

When you turn in your assignment it should include the

How to turn in

To turn in, zip all files into a single archive and email to cse522@cec.wustl.edu with subject Submit: Lab1.