Glossary Updates12 new terms added to the glossaries · October 2, 2026, 22:44 CEST
AI TechDocKnowledge

Glossary · Automation software engineering and architecture

Semaphore

Also known as: Counting semaphore, Binary semaphore

German: Semaphor

In concurrent programming, a semaphore is a synchronization object holding a counter that tasks decrement to acquire and increment to release, used to limit access to a resource pool or to signal events between tasks.

  • Software engineering

In one sentence

A semaphore is a synchronization counter that tasks decrement and increment to limit access to resources or signal events.

Example

An interrupt service routine gives a semaphore when a CAN message arrives, and the waiting communication task takes it and processes the message.

How it applies

  • Engineering: Counting semaphores manage N identical resources; binary semaphores signal events, for example from an interrupt to a task. Because semaphores have no owner, they generally do not support Priority inheritance.
  • Design: For protecting shared data between tasks, a Mutex is usually the better choice. Using semaphores for mutual exclusion risks priority inversion.
  • Documentation: Software design documents should describe which semaphores exist, what they signal or count, and which tasks give and take them.

Semaphore vs. mutex

A Mutex has an owner, allows one holder and is meant for mutual exclusion. A semaphore has no owner, can allow several holders and is often used for signaling.

By knowledge.aitechdoc.world · Published September 26, 2026 · Last reviewed

Source: AI TechDoc Blog editorial definition, based on concurrent programming practice (Dijkstra)

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Blog and are not part of any standard.

Seen a mistake? Send us a note!