MCQs City stays free thanks to ads. Please turn off your ad blocker for this site so content and features keep working.
Operating System
Semaphores 2
Q
What will happen if a non-recursive mutex is locked more than once?
AA. Starvation
BB. Deadlock
CC. Aging
DD. Signaling
Correct Answer:
B. B. Deadlock
Explanation:
If a thread which had already locked a mutex, tries to lock the mutex again, it will enter into the waiting list of that mutex, which results in a deadlock. It is because no other thread can unlock the mutex.