Semaphore in OS is an integer value that indicates whether the resource required by the process is available or not. The value of a semaphore is modified by wait () or signal () operation where the wait () operation decrements the value of semaphore and the signal () operation increments the value of the semaphore . Semaphore is simply a variable that is non-negative and shared between threads. A semaphore is a signaling mechanism, and a thread that is waiting on a semaphore can be signaled by another thread. It uses two atomic operations, 1) Wait, and 2) Signal for the process synchronization. Semaphore in OS is a synchronization tool used to regulate access to shared resources. Know the types and advantages of semaphores in OS .