(b) Monitors allow safe sharing of abstract data types among concurrent processes by ensuring that only one process can execute (any code that manipulates the shared data) within the monitor at any given time. In order to allow a process to wait on a condition from within a monitor, condition variables are implemented as follows: when p0 signals a condition while p1 is waiting on it, p0 continues to execute; p1 is merely woken up from the corresponding wait and allowed to compete for re-entry to the monitor when p0 exits the monitor. What implications does this implementation have on the semantics someone using this style of monitor can assume?
Comments
Leave a comment