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
- A15
- B22
- C18Correct answer
- D13
Answer
(C) 18
Approach
Apply semaphore arithmetic: $P$ decrements and $V$ increments.
Reviewed by UGC IQ Editorial Team.