Operating system concepts (3rd ed.)
Operating system concepts (3rd ed.)
Concurrent programming: principles and practice
Concurrent programming: principles and practice
Monitors: an operating system structuring concept
Communications of the ACM
Replay and Testing for Concurrent Programs
IEEE Software
Definitions and Detection of Deadlock, Livelock, and Starvation in Concurrent Programs
ICPP '94 Proceedings of the 1994 International Conference on Parallel Processing - Volume 02
Modeling VP operation: the Diwali Festival Problem
ACM SIGOPS Operating Systems Review
Hi-index | 0.00 |
A semaphore is a non-negative integer variable on which only operations P and V are allowed. The semaphore construct (with various extensions) is supported by many operating systems and is often used to implement other synchronization constructs. Since the semaphore construct is low-level, a semaphore-based program may contain synchronization errors that are very difficult to detect. In this paper, we propose a new operation VP (s1,s2), where s1 and s2 are distinct or identical semaphores. An execution of VP(s1,s2) by a process T is equivalent to that of "V (s1); P(s2)" except that when T starts the V (s1) operation, T is guaranteed to be the next process to access s2 (i.e., T will execute the P(s2) operation before another process executes a P(s2) or V(s2) operation.) Section 2 shows several examples to illustrate the advantages of the VP operation. Section 3 concludes this paper. In this paper, we assume that the queue for a semaphore is first-in-first-out and that the order of processes blocked in a semaphore queue is the same order in which they executed P operations on the semaphore. We also assume that the scheduling of processes in a concurrent program is fair, i.e., each process ready for execution will eventually be selected as the running process. Programs in this paper use Ada-like syntax.