Two or more processes are reading or writing some shared data and the final result depends on who runs precisely when.
Prohibit more than one process from reading and writing the shared data at the same time.
Also called critical section , the part of the program where the shared memory is accessed.
Conditions to a good solution
- No two processes may be simultaneously inside their critical regions
- No assumptions may be made about speeds or the number of CPUs
- No process running outside its critical region may block other processes
- No process should have to wait forever to enter its critical region