What happens if Non Recursive mutex is locked more than once?

Deadlock: 

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 deadlock. It is because no other thread can unlock the mutex.

An operating system implementer can exercise care in identifying the owner of mutex and return if it is already locked by same thread to prevent deadlocks.


SHORT ANSWER:
Any attempt to perform the "lock" operation on an ordinary mutex (lock) would either fail or block(DEADLOCK) when the mutex is already locked.

Comments