Skip to content

UGC NET CS 2023System Software and Operating System › Process ManagementVerified

UGC NET CS 2023 PYQ: At a particular time of computation, the value of a counting semaphore is 7. Then $20 \mathrm{p}$ operations…

At a particular time of computation, the value of a counting semaphore is 7. Then $20 \mathrm{p}$ operations and ' $\mathrm{x}$ ' $\mathrm{V}$ operations were completed on this semaphore. If the final value of semaphore is 5. $\mathrm{x}$ will be

  1. A
    15
  2. B
    22
  3. C
    18
    Correct answer
  4. D
    13

Answer

(C) 18

Approach

Apply semaphore arithmetic: $P$ decrements and $V$ increments.

Reviewed by UGC IQ Editorial Team.