-->

What is a semaphore?

- A semaphore is a hardware or a software tag variable whose value indicates the status of a common resource.

- Its purpose is to lock the common resource being used. A process which needs the resource will check the semaphore to determine the status of the resource followed by the decision for proceeding.

- In multitasking operating systems, the activities are synchronized by using the semaphore techniques.