Mutexes vs Semaphores

This lesson explains the difference between mutexes and semaphores.

We'll cover the following...

Question # 1

What is the difference between a mutex and a semaphore?

A mutex allows only a single thread to access a resource. It forces competing threads to serialize their access for the requested resource.

Semaphore, on the other hand, is used for limiting access to a collection of ...