Mail Archives: djgpp/1997/08/11/12:54:59
On 7 Aug 1997, Paul Derbyshire wrote:
>
> Andrew Crabtree (andrewc AT typhoon DOT rose DOT hp DOT com) writes:
> >> I know it sounds crazy, but what does the 'voltaile' with a
> >> variable/function ?
>
> What the heck is a "semaphore"???
From "UNIX Network Programming" by W. Richard Stevens (p137):
Semaphores are a synchronization primitive. As a form of IPC
they ... are intended to let multiple processes synchronize
their operations. ... Consider a semaphore as an integer
valued variable that is a resource counter. The value of the
variable at any point in time is the number of resource units
available.
A binary semaphore is a semaphore whose valid values are 0 and 1 which
is normally used to track and protect usage of a single resource.
Mutex semaphores are a newer high speed form of semaphore which is
part of the POSIX light weight thread primitives. Get an read
Stevens' book, it is the BEST reference on UNIX Interprocess
Communication available.
Art S. Kagel, kagel AT bloomberg DOT com
- Raw text -