The mutual exclusion problem is the problem of ensuring that only one thread out of two or more can be in a critial section at the same time.