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

  1. A.

    n+1

  2. B.

    n

  3. C.

    n-1

  4. 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.

Explore the full course: Mppsc Assistant Professor