Well this topic isn't as simple as it appears. As we know a mutex
can be implemented by a Semaphore with initial count=1.
But going through a few articles, I also found that tremendous amount of efforts has gone into separating these two, and treating mutex
as a separate concept different from a semaphore
Problem of Priority Inversion, which has lead to a new concept of priority inheritance, somewhat appear confusing to me.
Also some people speak of mutex with respect to ownership
( as it appears in what-is-mutex-and-semaphore-in-java-what-is-the-main-difference ). Well ownership
is bad term. In no way , Mutex is an owner of a shared resource. Holding a Lock
and Releasing a Lock
, are effectively a way of signalling, perhaps like, *Hey wait !! Till I complete and signal you*
Looking for some concrete reasons that has lead to a separation of Mutex
from a Semaphore
( with initial count = 1 )