What is Mutex?

A lock that only one thread can hold at a time. Typically a thread that cannot get it sleeps and yields the CPU, and the OS wakes it when the lock is released.

Field: Multicore & Synchronization

Mutex in the explanations

Questions that mention Mutex (4)

  1. Which correctly compares a mutex (a lock that sleeps while waiting) with a spinlock?
  2. In which situation is a spinlock least suitable?
  3. Which describes priority inversion in an RTOS?
  4. Which describes priority inheritance, used to prevent priority inversion?

Related terms

Spinlock Priority inversion Real-time operating system (RTOS) Context switch CPU time Priority inheritance ABA problem Acquire-release semantics Atomic instruction Barrier synchronization

Back to the glossary