87 views

A counting semaphore is initialized to $10$. The $6$ P(wait) operations and $4$ V(signal) operations were completed in this semaphore. The resulting value of semaphore is:

1. $0$
2. $8$
3. $10$
4. $12$

In P operation semaphore value is reduced by 1. In V operation semaphore value is increased by 1
so the  resulting value of semaphore is : Initial value - number of P + number of V = (10 - 6 )+ 4 = 8
by

1 vote