This lab cannot be done in 50 minutes. Therefore, you should start this lab before coming to lab.
Implement the Reentrant Lock synchronizer described in the Program 4 specification.
There are some tests for reentrant lock available
in ~cs520/public/prog4/testLock.c
.
However, you may want to use your own tests initially.
Use the valgrind
memcheck facility to validate that you properly free all allocated memory
blocks.
To run valgrind with testLock
:
valgrind --leak-check=yes testLock
.
Also run the program using the
valgrind helgrind
facility to check for threading errors:
valgrind --tool=helgrind testLock
.
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 lab7 sync.c
Submissions can be checked by typing:
% ~cs520/bin/scheck lab7
Remember that there are no late submissions of labs. Submit what you have prior to noon on Sunday March 27.
Comments and questions should be directed to pjh@cs.unh.edu