Difference between binary semaphore and mutex

They are NOT the same thing. They are used for different purposes! While both types of semaphores have a full/empty state and use the same API, their usage is very different. Mutual Exclusion Semaphores Mutual Exclusion semaphores are used to protect shared resources (data structure, file, etc..). A Mutex semaphore is “owned” by the task … Read more