Semaphore is a generalization of mutual exclusion locks. It allows at most N threads into critical section. Simple Semaphore uses a state field to keep track of the number of threads currently in CS, ...