in Operating System edited by
871 views
0 votes
0 votes

Semaphores are used to :

  1. Synchronise critical resources to prevent deadlock

  2. Synchronise critical resources to prevent contention

  3. Do I/o

  4. Facilitate memory management

in Operating System edited by
871 views

2 Answers

2 votes
2 votes
For process synchronisation the three methods normally used are  Semaphor,Monitors and Meassge passing. All these three methods follows mutual exclusion also. Semaphor is a low level implementation and can cause dead lock also.

Hence the option (B) is correct.
0 votes
0 votes

Contention, in general, means a state of disagreement or conflict (conflict among processes which use same resource). Semaphore can ensure mutual exclusion thus preventing the conflict.

Semaphore doesn't guarantee prevention of deadlock (also, we have solved many questions that use semaphores and still lead to deadlock.)

Related questions