
Mutex vs. Semaphore, what is the difference? - Flopsy
http://koti.mbnet.fi/niclasw/MutexSemaphore.html
======
reddiric
Another difference on Windows - Mutex objects can only be released by the
thread which acquired them, whereas a semaphore object with a count of one
could be acquired on one thread and then released on another.

[http://msdn.microsoft.com/en-
us/library/ms685066(v=vs.85).as...](http://msdn.microsoft.com/en-
us/library/ms685066\(v=vs.85\).aspx)

[http://msdn.microsoft.com/en-
us/library/ms685129(v=vs.85).as...](http://msdn.microsoft.com/en-
us/library/ms685129\(v=vs.85\).aspx)

~~~
noselasd
That is also the case for pthread mutexes and posix semaphores.

------
gatlin
I'd emphasize a little more that mutexes are special cases of semaphores. You
know, for the skimmers.

------
jevin
Can somebody explain why is this statement is not accurate :

"A mutex is really a semaphore with value 1."

------
dccoolgai
Ahh..The old "starving philosophers". If you were going to make me pick 5
thngs I could remember from my CS courses, this would probably come in at 4 or
5.

------
capkutay
A semaphore is just one of the implementations of mutex (mutual exclusion)
that allows waiters on the lock.

------
fudged71
They didn't mention that having -4 keys means that there are 4 people waiting
to use the bathroom.

