Browse Prior Art Database

Non-Atomic (Ordered) Semaphore Operations

IP.com Disclosure Number: IPCOM000039854D
Original Publication Date: 1987-Aug-01
Included in the Prior Art Database: 2005-Feb-01
Document File: 1 page(s) / 12K

Publishing Venue

IBM

Related People

Bissell, JM: AUTHOR [+4]

Abstract

A method is described to improve interprocess communications efficiency dramatically by attempting an array of operations in order, rather than as a unit. This new method allows semaphore operations specified in a semaphore array to be executed in order, even though some of the operations may be blocked for some time. The prior art performed all operations atomically, that is, none of the operations were performed until all blocking (waiting) was completed. This is useful in some cases, particularly resource sharing scenarios, but causes inefficiency when semaphores are used for process synchronization where each process wants to "POST" the other and then "WAIT" on it to finish. With atomic semaphore operations a process must make separate semaphore calls to "POST" and "WAIT.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 74% of the total text.

Page 1 of 1

Non-Atomic (Ordered) Semaphore Operations

A method is described to improve interprocess communications efficiency dramatically by attempting an array of operations in order, rather than as a unit. This new method allows semaphore operations specified in a semaphore array to be executed in order, even though some of the operations may be blocked for some time. The prior art performed all operations atomically, that is, none of the operations were performed until all blocking (waiting) was completed. This is useful in some cases, particularly resource sharing scenarios, but causes inefficiency when semaphores are used for process synchronization where each process wants to "POST" the other and then "WAIT" on it to finish. With atomic semaphore operations a process must make separate semaphore calls to "POST" and "WAIT." This method is implemented by adding a flag bit in the semaphore parameters to choose "ordered" vs. atomic execution of the semaphore operations in the array. If ordered execution is indicated by the flag bit being set, then the semaphore operations are performed in order, waiting when necessary. Therefore, in the process synchronization scenario described above, both the semaphore to "POST" and "WAIT" can be done with one call. The "POST" will be executed, and then the "WAIT" will be done. The blocking occurring on the "WAIT" will not affect the "POST" which will have already been completed. When the "WAIT" completes, any other semaphores specified...