A binary semaphore is much the same as a mutex. However, there may still be a difference whether the task that locked it is the only one that can unlock it. This is primarily an implementation issue, not a difference in the meaning of the construct.
Historically (and theoretically) it was the semaphore that was the basic building block for interprocess communications.
The mutex provides an efficient implementation of a binary semaphore, which is sufficient for many uses of a semaphore (but has restrictions, as outlined above). If your interest is theory, then just treat the mutex as a binary semaphore.
But if your interest is implementation, then my thinking is that a mutex is preferable over a semaphore wherever it is appropriate - not just for efficiency, but because it is less likely to result in complicated deadlocks. Mutex deadlocks are typically related to the simpler problem of correctly ordering resource acquisition and release.
Last edited by neonsignal; 12-07-2010 at 12:22 AM.