1.

What will happen if a non-recursive mutex is locked more than once?(a) Starvation(b) Deadlock(c) Aging(d) SignalingI have been asked this question during an internship interview.I'd like to ask this question from Semaphores in portion Process Synchronization of Operating System

Answer»

The CORRECT choice is (b) Deadlock

The 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.



Discussion

No Comment Found

Related InterviewSolutions