Extra Credit
I have planned this extra credit to be as fair as I can be, allowing Project 5 to be
briefly reopened for extra credit.
There is also an Extra Credit for Project 7. That is an advanced extra credit depending
upon both Project 6 and Project 7.
- The extra credit for both are at most 2 points.
- The extra credit for Project 5 is only on the Basic Test.
- The Basic Test is a maximum of 5 points. The EC might be
limited by the number of points already obtained on the Basic Test.
- The Extended Test of Project 5 will be automatically reweighted from 1 point
to 2 points. This will not negatively affect the grade of those seeking the extra credit.
The re-weight is for fairness to those students that completed the project by the
original date.
- The EC of both are due Monday, 23 November, but are extended with 3 day grace period.
- No points are awarded on any homework after the expiration of this grace period.
Monitor Hints
The following rules will help correctly write the monitor portion of Project 5.
- Have critical sections. These are code sectdions that are considered
inside the monitor.
- For simplicity, such critical sections are the entire body of a subroutine.
- Always take the lock when entering a critical section, and release the lock on exiting.
- Assuring taking of the lock consistently can be done by taking the lock immediately on entering the subroutine.
- Assuring the release of the lock consistently can be done by releasing the lock immediately before
any return statment in the subroutine.
- Wait is typically enclosed in an "infinite looking" while loop, whose condition is a test
such as Is_Empty and whose body is the single wait operation.
- Return errors only if there is an error, not for a partially completed monitor task.