Programming assignment #2 - Performance Measurement and Concurrent Programming

Due by 11:59pm, Monday, September 29th.

The goal of this assignment is to get you thinking about the costs of various system calls and about concurrency. Once again, this is an individual assignment. However, you are encouraged to help (and seek help from) your peers (except sharing code, of course). As part of this assignment, you will learn how to use the pthreads package.

Assignment description:
For many of the following measurements, you may need to repeat the experiment many times and then take the average. Use a high resolution timer for x86 when necessary. The goal is to have STABLE measurement results. For some of the questions, I will provide a possible measurement strategy as a hint. You are encouraged to be innovative in designing your own test. Extra credit will be given for such innovations that also (of course) work. For comparison purposes, all measurements MUST be done on machines in the graduate software lab or the CSUG lab.

Additional note about performance measurement: You should be careful with your measurement methodology. You may want to take into account things like loop overhead and timer overhead (making calls to start and stop the timer can induce costs that are non-negligible when measuring the cost of a single function call). For the pthreads part, you should be careful about how you include thread creation overhead as well as where you insert your timing calls in order to determine both overall and breakdown timings.

Administrative policies

Turn-in:
You are asked to electronically turn in your source files and a makefile. Attach a README file describing the name of the executable, special compiling instructions, or anything else special you want to let us know. The README file should be in plain text format. Instructions for electronic turn-in can be found on the class web page.

Late turn-in policy:
Late turn-ins will be accepted for up to three days, with 10% penalty for each late day. No turn-ins more than three days late will be accepted.