Computer Science EngineeringHard

A counting semaphore is initialized to 10. After 6 wait (P) operations and 4 signal (V) operations have completed, its value is

  1. A. 4
  2. B. 8
  3. C. 0
  4. D. 12

Correct answer: B. 8

Each P decrements and each V increments the value, so 10 - 6 + 4 = 8.

More OS, DBMS, Networks & Computer Architecture (ISRO CS) questions

Exams that ask this topic