Monday, April 11, 2011

Differences between Semaphores and Mutexes

11, Apr 2011
What are the differences between semaphores and mutexes?. Are binary semaphore and mutex same or just a notational convenience?
It is typical interview question. Surprisingly, we get correct answers rare.
From my learnings during RTOS design, I am preparing an article for Geeksforgeeks (link), it will be published soon.
An interesting question, if you observe Windows word 2003, Adobe PDF reader, only one instance will be running in the task manager. Where as Windows Excel 2003 will create as many processes as number of excel documents opened. How to implement, only one instance of process must be running, invoking another instance should prompt "An instance is already running" message?

No comments: