106 views
At a particular time of computation, the value of a counting semaphore is $7$ , then $20$ $P$ operations and 'x' $V$ operations were completed on this semaphore. If the final value of the semaphore is $5$, the value of $x$ should be ____

Lets say semaphore value (S)= 7

20 (P) operations, x (V) operations

so,

7 - 20 + x = 5

x=18