Semaphores - comments
wait() and signal() are to be implemented as atomic operations.
Difficulties:
- signal() and wait() may be exchanged inadvertently by the programmer. This may result in deadlock or violation of mutual exclusion.
- signal() and wait() may be left out.
Related wait() and signal() may be scattered all over the code among the processes.