Re: Paper Evaluations

Arvind Santhanam (arvind@cwc.ucsd.edu)
Thu, 11 May 2000 08:09:28 -0700 (PDT)

Monitors: An OS Structuring Concept
-----------------------------------

The main point of this paper is to develop the concept of monitors
and demonstrate its applicability in structuring OS design. It is an
effective tool to enforce synchronization of process, particularly
critical sections. Monitor contains some data and some procedures and data
is accessed only through those procedures declared in the monitor. Data
consistency is guaranteed through harmonious synchronization of processes,
while encouraging concurrency. The paper illustrates a number of commonly
encountered examples to demonstrate the use of monitors and also throws
light on certain optimizations that could enable efficient implementation.
Monitors can be implemented using semaphores and they allow for elegant
programming. Use of condition variables helps provide a more sophisticated
policy of allocating resources among processes. Monitors are implemented
using semaphores and the underlying hardware provides the Test-and-Set
function to tailor structuring of monitors in OS design. Proof of
correctness is another important facet and relies on the execution of only
one monitor procedure at a time and only that procedure can access the
data local to it.

Use of sophisticated yet simple to implement scheduling policies
for resource allocation is a dire necessity to robust implementation using
monitors. Measures must be taken to avoid/prevent the occurance of `Deadly
Embrace' effect. The scheduling policies must allow for pre-emption to
avoid problems of starvation. Problems like trashing should be alleviated.
The paper also espouses the use of a static scheduling policy under high
load conditions. Given the simplicity of the measure, it would be a rather
simple but efficient technique to employ.


Experience with Processes and Monitors in Mesa
----------------------------------------------

Monitors are an implement for fostering concurrency and
synchronization among processes, and maintaining an error-free access
mechanism to shared resources. This paper explores the various facets
involved in implementing monitors in MESA; it addresses the problems of
nested monitor calls, and factors determining in implementation of WAIT
namely, priority scheduling, handling timeouts, aborts/exceptional
conditions, creation/ deletion/ interaction among processes etc and
presents steps taken to combat these challenges. It reflects the enormity
of the task involved in implementing monitors into MESA.

Processes are used instead of a variable wherever possible. Every
new invocation creates a new process, thus enhancing concurrency. Since
processes can be born or die at all times, the parameters that are passed
on between processes must be alive as long as the process is. The
implementation of monitors in Mesa has a richer set of features like
external/internal procedures unlike that described in the previous paper.
The exceptional conditions are handled by simply releasing the lock and
executing the user-specified program, also some signalling mechanisms are
used to resume a waiting process, like naked notify, abort, timeout and
broadcast. The concept of monitored objects is another interesting facet
for highly concurrent programming. Suitable measures are taken to prevent
the occurance of deadly embrace. Priorities and preemption are also
features of the implementation, and they disallow priority inversion. This
is done by granting the the highest priority to the monitor while the
process accessing the monitor gets this priority.