microZEUS
The whole stack, hand-drawn.

◄ Wiki / OS

mutual exclusion

The guarantee that only one thread or CPU is inside a given critical section at any moment.

When multiple threads touch shared data, mutual exclusion is the property that prevents two of them from being in the danger zone simultaneously, which is what stops corrupted, half-updated state. Locks like mutexes and spinlocks exist to provide it. In microZeus a spinlock bug meant this guarantee silently never held, so supposedly-protected sections weren't actually protected.

See also

  • mutexA lock that lets only one thread into a protected section at a time, putting others to sleep while they wait.
  • per-CPU stateData kept in a separate copy for each processor core, so cores don't step on each other.

Referenced by

mutex · per-CPU state