Due by 11:59pm, Friday, February 9. The managing TA for this assignment is Daniel Mullowney (dmullown@mail). Please direct your questions on this assignment to Daniel.
This is an individual assignment. 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 credits 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.
Xseconds). The minimal cost can be emulated by measuring a bare function call that neither takes any parameter nor does anything inside the function.
getpid()which doesn't really do anything.
num(set to be 0 initially), a mutex lock and two condition variables. Thread #1 keeps waiting for
numto become 1 and then changing it to 0. Thread #1 keeps waiting for
numto become 0 and changing it to 1.
Xseconds to complete without any competing workload.
YUDP packets each second (to another machine in the lab, which we don't really care). Now the background CPU-bound program takes
You are asked to electronically turn in your source code for solving each question and preferably a makefile. You should also electronically turn in a written report for this assignment. In the written report, indicate the final measurement results, your measurement methodology (including how many times the experiments are repeated before the average is taken etc.) and the names of the machines where your measurements were conducted. Again, you must do the measurements on machines in the graduate software lab or the CSUG lab. Describe all other important things for your measurements. The report should be in either of the following formats: PDF, Postscript, or plain text. Instructions for electronic turn-ins 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-day late will be accepted.