Implement the Countdown Latch synchronizer described in the Program 5 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 April 14. Be careful: one minute late is late.
Comments and questions should be directed to pjh@cs.unh.edu