The problem of nested monitor calls revisited

Recently Lister has brought up the problem of nested monitor calls in connection with an intermediate exit from one of the inner levels via a WAIT-operation [I]. Among several options concerning the release of outer monitors the most natural one is that which releases exclusion at all levels (if intermediary delocking is at all considered). However, with that solution two partial problems seem difficult to achieve. (I) Regaining access to all levels after a corresponding SIGNAL-operation even if some of the outer levels have been used by other processes in the meantime. (2) Insuring data consistency at outer levels. The second point is indeed a problem. However, it is also present in a monitor without nesting but utilizing a WAIT-operation somewhere in a procedure's body. Of course in this simple case it might be easier for a compiler to detect a violation, but generally it must probably stay within the responsibility~of the programmer to guarantee the monitor invariants. On the contrary, a solution to the first problem should not be impossible to conceive if one is willing to follow kind of a systematic structuring. We propose the following approach: The corresponding pair of synchronization operations (for a two-process-communication) to be used within a monitor is roughly ment as follows (s.e.g.[2]).