Monitors (Hoare)
My Paper Reading Report
What problem does the paper address?
How is it different from previous work, if any?
What is the approach used to solve the problem?
How does the paper support or otherwise justify its arguments and conclusions?
Was the paper, in your judgement, successful in addressing the problem?
Lecture Note
Note
-
Processes mentioned in this paper are actually threads since they share the same address space
-
Each function in the monitor class use the same lock as they have the ability to obtain the same set of shared resources
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | |
Programmers do not manage locks; the compiler does the job since compiler known where locks are needed to protect the shared resources.
Question
Q: If a process calls wait while holding a lock, we risk having a deadlock. What should we do to resole this issue?
A: We let condition variable release the lock at the beginning of wait and acquiring lock at the end of signal