In concurrent programming, concurrent accesses to shared resources lead to unexpected or erroneous behavior so a part of the program where the shared resource is accessed is protected. This protected section is the critical section or critical region. It cannot be executed by more than one process. Typically, the critical section accesses a shared resource,