CS520
Spring 2019
Laboratory 9
Friday April 5
The lab must be submitted prior to noon on Sunday April 7.


Implement the Reentrant Lock synchronizer described in the Program 5 specification.

There are some tests for reentrant lock available in ~cs520/public/prog5/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 lab9 sync.c

Submissions can be checked by typing:

% ~cs520/bin/scheck lab9

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


Last modified on January 15, 2019.

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