1. What is the difference between a semaphore and a mutex?
Sigiloso
Both serve to synchronize access to a shared resource by multiple threads. The first 'pends' till the resource is available and the producer 'signals' when done; the second acquires the lock, uses the resource and releases the lock.