Dekker’s solution
Solution 1 cared about just “mutual exclusion” - only one key to the lock solution.
Solution 2 cared about fairness and mutual exclusion. But could result in deadlock.
There are variations of this which could result in starvation (none entering the CS or one of them monopolizing the CS).
A correct solution that combines “turn” and “flag” array was designed by Dekker. We will study this next.