3 votes 3 votes A counting semaphore is initialized to $X$. Then $13\; P\; \text{(wait)}$ operations and $25\;V \; \text{(signal)}$ operations are completed on this semaphore. If the final value of semaphore is $8$, then the value $X$ will be _______ Operating System go2025-os-1 numerical-answers process-synchronization + – gatecse asked Nov 15, 2020 gatecse 173 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 2 votes 2 votes Each signal operation increments the semaphore and each wait operation decrements it. Thus we have $X - 13 + 25 = 8 \implies X = -4$ gatecse answered Nov 15, 2020 • selected Oct 30, 2021 by Arjun gatecse comment Share Follow See all 0 reply Please log in or register to add a comment.