in Operating System edited by
563 views
0 votes
0 votes

 I think that statement iii is false , deadlock can arise in both semaphore as well as monitor (mutex) 

in Operating System edited by
by
563 views

3 Comments

No. Monitors do not allow any kind of deadlock because it provides mutual exclusion by default.
0
0
Suppose 2 processes and

Two binary semaphore X Y initialize to 1

Process 1 : down(X)   | process 2 : down(Y) | process 1 : down(Y) not granted | process 2 : down (X) not granted

 

Deadlock situation right ??
0
0
There will be a lock associated with monitor, it will be one process at any given point of time.So no chance of deadlock.

There is a chance of deadlock with semaphore as your example suggests @magma.
0
0

Please log in or register to answer this question.

Related questions