What is Semaphore?

A synchronization mechanism holding a counter of remaining units: decrement before use (waiting at 0) and increment when done. Used to manage resources with a fixed number of units.

Field: Multicore & Synchronization

Semaphore in the explanations

Questions that mention Semaphore (1)

  1. What is the most suitable use of a counting semaphore?

Related terms

ABA problem Acquire-release semantics Atomic instruction Barrier synchronization Bus snooping Compare-and-swap Condition variable Critical section Data race Deadlock

Back to the glossary