Computer Science

Mutex, explained

A mutex is a synchronization primitive that allows only one thread or process to enter a critical section at a time.
Back to Glossary

Part of the Semantic Notion technical glossary.

Short Definition

A mutex is a synchronization primitive that allows only one thread or process to enter a critical section at a time.

Intuition

It is a one-person-at-a-time sign for shared data.

Technical Definition

A mutex provides mutual exclusion by requiring acquisition before accessing protected shared state and release afterward.

Example

Two threads updating the same counter can use a mutex to prevent lost updates.

Common Misunderstandings

A mutex prevents simultaneous access but can introduce deadlocks if used poorly.
Locking does not automatically make a whole design correct.

Start here

Need the broader concept map?

Return to the glossary index to move from this definition into adjacent AI, ML, mathematics, and computer science terms.