@DK: absolutely......actually mutex is a kinda semaphore...and unlike
semaphores it does not have any list(of waiting processes) associated
with it and just is a kind of lock and key model with no waiting
Q.someone can say that they are Binary semaphore since binary
semaphore have only two values 0/1 thus no waiting Q and behave like
mutex


On Jun 18, 1:58 am, DK <[email protected]> wrote:
> @Dumanshu/@Ankit: Of course mutexes can be made to work between processes
> (it's an implementation detail). But the *concept* of a mutex is Owner +
> (Lock & Key) pair. By adding the concept of Owner to a lock, we can ensure
> that only the person who locked the lock can open it. This *guarantees*
> mutual exclusion (which is unlike a semaphore). A semaphore is a signalling
> mechanism between threads/processes that simply indicates an event that has
> occured asynchronously to the process/thread's flow of control (for
> processes/threads other than the event generating process of-course). It is
> often used to indicate that cooperative progress may be possible on
> resources under contention or synchronization between states may be
> required. Any cooperating process/thread can modify the value of a semaphore
> which is not true of a mutex.
>
> Note: Mutex and Semaphore are essentially concepts. Their implementations
> can vary in different systems and have different implementation constraints
> but the theory is clear. The two are different and serve different purposes
> though they may share implementation details.
>
> --
> DK
>
> http://twitter.com/divyekapoorhttp://www.divye.in

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to