semaphore
Sign in to savevariable that is changed (e.g., incremented, decremented, toggled) depending on programmer-defined conditions, used to control access to a common resource by multiple processes in a concurrent system
In the Vinony graph
Vinony's link graph records 321 inbound references to semaphore, and connects out to Edsger W. Dijkstra, assignable variable and lock.
It is catalogued under topics including Computer-mediated communication, Concurrency (computer science) and Concurrency control.
Vinony links it to 38 Wikipedia language editions.
Wikidata facts
- Instance of
- method
- Has use
- inter-process communication
Show 2 more facts
- Stack Exchange tag
- stackoverflow.com/tags/semaphore
- computes solution to
- producer-consumer problem
Sources (3)
via Wikidata · CC0
~18 min read
Encyclopedic overview
In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple threads and avoid critical section problems in a concurrent system such as a multitasking operating system. Semaphores are a type of synchronization primitive. A trivial semaphore is a plain variable that is changed (for example, incremented or decremented, or toggled) depending on programmer-defined conditions.
A useful way to think of a semaphore as used in a real-world system is as a record of how many units of a particular resource are available, coupled with operations to adjust that record safely (i.e., to avoid race conditions) as units are acquired or become free, and, if necessary, wait until a unit of the resource becomes available.
Excerpted from Wikipedia’s “semaphore” article, available under the CC BY-SA 4.0 licence.