CS520
Fall 2018
Laboratory 10
Friday November 9
The lab must be submitted prior to noon on Sunday November 11.


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

There are some tests for countdown latch available in ~cs520/public/prog5/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 lab10 sync.c

Submissions can be checked by typing:

% ~cs520/bin/scheck lab10

Remember that there are no late submissions of labs. Submit what you have prior to noon on Sunday November 11. Be careful: one minute late is late.


Last modified on October 26, 2018.

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