Can a semaphore have a negative value?
Semaphores are integer variables which count the number of _wakeups_ pending on it for future use. A semaphore cannot have a negative value, it can either be zero or positive. If it is zero then it indicates that there are no wakeups pending. A positive value represents the number of wakeups pending on it. Only two operations can be performed on a semaphore: DOWN and UP. The DOWN operation decrements the value of the semaphore if it is greater than zero. If the value is zero then the process executing the DOWN goes to sleep on that semaphore. The UP operation checks for any processes sleeping on the semaphore and wakes them up. If there are none, then it increments the variable to indicate that there is yet another wake up pending. The semantics of these operations ensure that a semaphore will never have a negative value.