Semaphores let processes query or alter status information. They are
often used to monitor and control the availability of system resources
such as shared memory segments.
Semaphores can be operated on as individual units or as elements in a
set. Because System V IPC semaphores can be in a large array, they are
extremely heavy weight. Much lighter weight semaphores are available in
the threads library (see man semaphore and also
Chapter 30.3) and POSIX semaphores (see below briefly).
Threads library semaphores must be used with mapped memory . A semaphore
set consists of a control structure and an array of individual
semaphores. A set of semaphores can contain up to 25 elements.
It looks like you're new here. If you want to get involved, click one of these buttons!