critical section
Exclusive execution zone
A critical section is a portion of code that accesses shared resources and must not be executed by more than one thread or process at a time.
Without protection, simultaneous access causes race conditions—unpredictable behavior from interleaved operations.
Programmers guard critical sections with locks, semaphores, or other synchronization mechanisms: The mutex ensures only one thread enters the critical section.
- mutual exclusionCannot occur together
- lockingFixing firmly in position
- semaphoreFlag-based signaling system
- deadlockMutual blocking, no progress
- atomicityAtoms in a molecule
race condition · acquire · concurrency · interleaving · release · thread · context switch · bottleneck · barrier · synchronization · shared memory · multithreading · monitor · wait · interrupt · parallelism · guard · unsafe
- concurrencythreads, deadlock, semaphore, atomic, race condition
- concurrency bugsrace condition, deadlock, starvation
section, critical, critically, uncritical, hypercritical, overcritical, noncritical, criticality, supercritical