i am trying to understand semaphores and mutex, just finished understand threads.
The example http://www.amparo.net/ce155/sem-ex.html
uses semaphore to enter critical section to increment counter. The same thing can be easily implemented using mutex.
so what is the use case of semaphore. Is that just a different variation or is there something which semaphore can do whic mutex can't ?