Tuesday, 17 January 2017

Difference in Semaphore, mutex and lock

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

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


No comments:

Post a Comment