What are the practical uses of semaphores?
mutex, semaphore
Solution
I think you already know what a semaphore is and you are just wondering how it is used on "real software".
"real sw like Office, Firefox have places where they use it?"
Yes, "real software" use semaphores a lot, it is not just theoretical, e.g. Chromium source, windows semaphore handling code and the same code used by Virtual Box.
"What are the practical uses of semaphores" / "What are the common use patterns for semaphores?"
They are more suitable for producer-consumer synchronization problems. Situations that you have the number of producers and consumers both > 1.
The Fuhrmanator's reference of typical use of semaphores are good ones.
Problem
Nonbinary ones.. I have never encountered a problem that required me to use a semaphore instead of mutex. So is this mostly theoretical construct, or real sw like Office, Firefox have places where they use it? If so what are the common use patterns for semaphores?