⟩ Explain what is Mutex?
Threads share a mutually exclusive resource manager, Mutex. It ensures that only one thread at a time makes use of one resource (one object) at a time. It is like a moderator that controls the microphone and gives the word to one person at a time. Thus, Mutex grants access to resources one thread at a time. For this, it puts the threads that want to access resources “on hold” until those are in use.