in Operating System edited by
87 views
0 votes
0 votes

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 Operating System edited by
by
87 views

1 Answer

1 vote
1 vote
Best answer
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
selected by
Answer:

Related questions