Quote:
Originally Posted by vishnu anand
what is difference between mutex and semaphore?? in which case do we use mutex and in which case we use semaphore??
|
They are basically the same thing. They are both used to control access to a resource. The main difference is that a mutex is set or not set, where a semaphore is typically assigned an interger n that allows n number of concurrent accesses before access is denied.
There are a bunch of decent guides on mutexes/semaphores. Here is one -->
http://www.yolinux.com/TUTORIALS/Lin...ixThreads.html