A mutex is a synchronization primitive that grants one execution context at a time ownership of a protected boundary.
Programs use a mutex so conflicting operations cannot enter the same critical section concurrently.
A mutex protects an invariant only when every conflicting operation obeys the same locking rule.
Used in DKKB
Locks, mutexes, and critical sectionsUse mutual exclusion to serialize access to shared state when concurrent execution would violate an invariant.
Related knowledge
Locks, mutexes, and critical sectionsUse mutual exclusion to serialize access to shared state when concurrent execution would violate an invariant.