Monitors: an operating system structuring concept
Communications of the ACM
Concurrent Programming in Java: Design Principles and Patterns
Concurrent Programming in Java: Design Principles and Patterns
A Comparison of Tabular Expression-Based Testing Strategies
IEEE Transactions on Software Engineering
Hi-index | 0.00 |
In concurrent programing, threads may communicate via data structures that can be embedded in shared objects or monitors. In this paper we outline the basis for a short module that can be used to teach better programming of such monitors by emphasizing logical statements, called predicates, on the data structures inside these shared objects. We base the module on the general concepts of object oriented programming, where the (usually) private data structure is manipulated by public methods, and where an invariant predicate holds before an after the execution of each method. An important challenge when writing a monitor is to program correct synchronization, and the main contribution of this paper is to show how to teach the students to use predicates to reason about, and make code that performs correct waiting and signaling inside monitors. It is also important to teach students to select the most appropriate synchronizing tool.