根据《操作系统设计与实现》(Operating Systems - Design and Implementation by Tanenbaum etc.)第三版 2.2.5 Semaphores:
The down operation on a semaphore checks to see if the value is greater than 0...If the value is 0, the process is put to sleep without completing the down for the moment...after an up on a semaphore with process sleeping on it, the semaphore will still be 0, but there will be one fewer process sleeping on it.
Semaphore值最小为0,不可能为负数。
根据《操作系统设计与实现》(Operating Systems - Design and Implementation by Tanenbaum etc.)第三版 2.2.5 Semaphores: