CS520
Spring 2016
Laboratory 8
Friday April 1
The lab must be submitted prior to noon on Sunday April 3.


This lab cannot be done in 50 minutes. Therefore, you should start this lab before coming to lab.

Implement the Countdown Latch synchronizer described in the Program 4 specification.

There are some tests for countdown latch available in ~cs520/public/prog4/testLatch.c. However, you may want to use your own tests initially.

Note that you must complete your implementation of the reentrant lock synchronizer before starting countdown latch. The grading of this lab will include testing of both reentrant lock and countdown latch.

Use the valgrind memcheck facility to validate that you properly free all allocated memory blocks. To run valgrind with testLatch: valgrind --leak-check=yes testLatch.

Also run the program using the valgrind helgrind facility to check for threading errors: valgrind --tool=helgrind testLatch.

You should submit all the source code for your assignment in one file called sync.c.

To turn in this laboratory, type:

% ~cs520/bin/submit lab8 sync.c

Submissions can be checked by typing:

% ~cs520/bin/scheck lab8

Remember that there are no late submissions of labs. Submit what you have prior to noon on Sunday April 3.


Last modified on March 24, 2016.

Comments and questions should be directed to pjh@cs.unh.edu