Vidyalelo
Computer Fundamentals · Q414

Operating System

Computer Related · Computer Fundamentals · question 414

Q414

Semaphores

A.
synchronize critical resources to prevent deadlock
Answer
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

Answer: Option A

Solution

Answer: Option A
Solution:
Semaphores are integer variables that are used to solve the critical section problem by using two atomic operations wait and signal that are used for process synchronization. The definitions of wait and signal are as follows. The wait operation decrements the value of its argument S, if it is positive.