Tuesday 17 January 2017

Difference in Semaphore, mutex and lock

lock allows only one thread to enter the part that's locked and the lock is not shared with any other processes.
mutex is the same as a lock but it can be system wide.

semaphore does the same as a mutex but allows x number of threads to enter.


No comments:

Post a Comment