Incorrect Algorithm No. 1: Taking Turns

CONCEPT: A shared variable named turn is used to keep track of whose turn it is to enter the critical section.

INITIALIZATION:

	shared int turn;
	...
	turn = ;
ENTRY PROTOCOL (for Process ):
	/* wait until it's our turn */
	while (turn != ) {
	}
EXIT PROTOCOL (for Process ):
	/* pass the turn on */
	turn = ;
ANALYSIS: Each process passes the turn to the other upon exit, and cannot get it back until the other process actually uses it. Thus one process may block another even when it is not in a critical section. The progress  requirement is violated.