The Critical Section Problem
n processes are competing to use some shared data.
Each process has a code segment, called critical section, in which the shared data is accessed.
Goal: when one process is executing in its critical section, no other process can execute in its critical section.
Each process looks like this: