Binary Semaphore Vs Mutex Code Example


Example: Difference between mutex and binary semaphore

A Mutex(acquire(),release()) is different than a semaphore as  it is a locking mechanism while a semaphore(wait(),signal())  is a signalling mechanism.A binary semaphore can be used as  a Mutex but a Mutex can never be used as a semaphore.

Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?