Grading for Question 3 -- 20 points

Grading for this question was broken down into the following: The main problem that y'all had in part one was waking up multiple readers when the writer completed. Most of you just did one cv_notify() in end_writers(). You need to do one per sleeping thread, or to do a cv_notify() at the end of begin_reading() as in my answer. This was a two point deduction. I also deducted for errors like protecting your cv_wait() calls with if's rather than while's, calling cv_wait() and cv_notify() outside of the monitor, and general synchronization problems.

If your code had the right framework, but otherwise was not very close, you started with 4 points, and points were taken off if things were particularly sketchy or incorrect.


Grade Histogram