Semaphore ensures not more than a specified number of concurrent threads can access a resource.Mutex is used as a synchronization technique where a resource has to be shared by multiple threads simultaneously. It is used for inter-process synchronization because multiple applications can access the same mutex object.