All mock tests are FREE till 31 December — register to save your progress

Two atomic operations permissible on semaphores are ________ and ________.

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. wait, signal

Explanation

A semaphore supports exactly two atomic operations in the classical Dijkstra definition: wait() (also written P or down), which decrements the semaphore and blocks the caller if the value goes negative, and signal() (also written V or up), which increments the semaphore and may wake a waiting process. 'Stop' and 'hold' are not standard semaphore operations in any textbook definition. Therefore the correct pair is wait, signal, option (iv).

More Computer System Architecture questions