Semaphore Operations
The two main operations that can be performed on a semaphore are:
wait(): This operation decrements the semaphore value. If the semaphore value is zero, the process will block until the semaphore value becomes greater than zero.
post(): This operation increments the semaphore value. If there are any processes blocked on the semaphore, one of them will be unblocked.