The Critical Section Problem

For a solution to the critical section problem to work, it has to satisfy the following 3 conditions:

  1. Mutual Exclusion: Only one process at a time can execute code in their critical section.
  2. Progress: If no process is currently executing their critical section but one or more want to, then only the processes not in their remainder sections can participate in the decision of whom will execute the code first, and the decision cannot be postponed indefinitely. (I.e., processes cannot wait forever to get into their critical sections.)
  3. Bounded Waiting: There exists a limit on the number of times that other processes can get into their critical sections after a process made a request to enter their critical section and before that request is granted. (I.e., a process requesting entry into their critical section will get a turn eventually, and there is a limit as to how many other processes get to go first.)

We assume that all processes proceed at a non-zero speed, but no assumptions can be made regarding the relative speed of one process versus another.