Original Publication Date: 1995-Jul-01
Included in the Prior Art Database: 2005-Mar-30
Focazio, R: AUTHOR [+2]
Described is the architecture, analysis, design and implementation of fast synchronization primitives in the IBM* Microkernel Product. Without these mechanisms, only kernel mechanisms are provided to enable applications and/or threads to rendezvous or to protect resources. In the case where resources are often available, the use of kernel mechanisms is often too expensive.
the architecture, analysis, design and
implementation of fast synchronization primitives in the IBM*
Microkernel Product. Without these mechanisms, only kernel
mechanisms are provided to enable applications and/or threads to
rendezvous or to protect resources. In the case where resources are
often available, the use of kernel mechanisms is often too expensive.
of the synchronization services package will now
be described. In addition to any synchronization services provided
by a threading package, such as C threads, the microkernel product
provides three types of user level synchronization---counting
semaphores, exclusion semaphores, and conditions---each of which can
be used for synchronization within a single task. Counting
semaphores can be used for synchronization between cooperating tasks.
The counting semaphores and conditions mechanisms provide timeout
capabilities for functions that block. Additionally, the counting
functionality semaphores allow for unlimited readers, while providing
some basic recovery features. The design ensures that uncontested
acquisition of a synchronization structure is as fast as possible
since there is no interaction with the microkernel.
The synchronization services use the following data
o sema_id_t is a pointer to a counting semaphore that permits
limited restricted acquisitions and unlimited shared
o sema_attr_t is a pointer to the semaphore attribute structure.
The countfield specifies how many restricted acquisitions are
permitted. The type field specifies if the semaphore is to be
shared by multiple tasks, and if it is to be recoverable.
o mutex_id_t is a pointer to a mutual exclusion semaphore that
permits only one restricted acquisition and no shared
o mutex_attr_t is a pointer to the mutual exclusion semaphore
attribute structure. The policy field specifies which lock
management policy will be applied to the mutex. Possible
are MUTEX_BP or MUTEX_BPI. MUTEX_BP sets the policy to basic
priority protocol. MUTEX_BPI sets the policy to basic priority
protocol with priority inheritance. Priority inheritance is
supported, but may affect performance.
o cond_id_t is a pointer to a condition variable. cond_attr_t is
pointer to the condition variable attribute structure. The
timeout field specifies the default timeout period for this
condition variable. The default for timeout is TIMEOUT_NONE.
the timeout variable is set to 0, the call will return
immediately after requesting a context switch. The mutex field
is filled in by the user to specify which mutex is associated
with the condition.
In order to provide fast sy...