A semaphore count of negative n means (s = −n) that the queue contains
2009
A semaphore count of negative n means (s = −n) that the queue contains
- A.
n+1
- B.
n
- C.
n-1
- D.
0
Attempted by 145 students.
Show answer & explanation
Correct answer: B
A semaphore count of s = −n indicates that n processes are blocked waiting for the resource. The magnitude of the negative value directly corresponds to the number of entries in the wait queue.
A video solution is available for this question — log in and enroll to watch it.