Controlled access to shared data

Dekker's algorithm guarantees mutual exclusion

Proof: once a given process is in its critical region, the other process is blocked from entering until the first process leaves.

A violation of mutual exclusion could only occur if both processes enter their critical regions at the nearly the same time. Suppose, then, that a violation of mutual exclusion occurs because both processes execute their entry code in parallel.