| VP: a new operation for semaphores |
| Full text |
Pdf
(417 KB)
|
| Source
|
ACM SIGOPS Operating Systems Review
archive
Volume 30 , Issue 3 (July 1996)
table of contents
Pages: 5 - 11
Year of Publication: 1996
ISSN:0163-5980
|
|
Authors
|
|
K. C. Tai
|
Department of Computer Science, North Carolina State University, Raleigh, NC
|
|
Richard H. Carver
|
Department of Computer Science, George Mason University, Fairfax, VA
|
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 2, Downloads (12 Months): 18, Citation Count: 1
|
|
|
ABSTRACT
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.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
|
| |
3
|
[3] Kessels, J. L. W. and Martin, A. J., "Two implementations of the conditional critical region using a split binary semaphore", Information Processing Letters, Vol. 8, No. 2, Feb. 1979, 67-71.
|
| |
4
|
|
 |
5
|
|
| |
6
|
|
|