Operating Systems Concepts - Engineering

Q1:

Semaphores

A synchronize critical resources to prevent deadlock

B synchronize critical resources to prevent contention

C are used to do I/O

D are used for memory management

E None of the above

ANS:A - synchronize critical resources to prevent deadlock

Answer is B.

Deadlock can happen even if the semaphore is there. It only assures that a part of a code is executed by only one processor.