Typically, a critical area is a place where, if there were two separate threads of execution, there would be a race condition or some other undesirable effect. Semaphores are one way to prevent two threads from being in a critical area at the same time.
source
share