Java
Pages
Home
Java
Interview
Showing posts with label
lock
.
Show all posts
Showing posts with label
lock
.
Show all posts
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.
Older Posts
Home
Subscribe to:
Posts (Atom)