What's the difference between a mutex and a semaphore?
A mutex is owned by a thread/process. So once a thread locks it, then other threads/processes will either spin or block on the mutex. Whereas, semaphore allows one or more threads/processes to share the resource.
Mutex is binary semaphore
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment