Concept Flow - Peterson's solution
Process 0 wants to enter
Set flag[0
Set turn = 1
Wait while flag[1
Enter critical section
Set flag[0
Process 0 leaves critical section
Each process signals intent, sets turn to the other, then waits if the other wants in and it's their turn, ensuring only one enters the critical section at a time.