A counting semaphore is initialized to 8. 3 wait() operations and 4 signal() operations are applied. Find the current value of semaphore variable.
(A)
9
(B)
5
(C)
1
(D)
4
Answer: (A)
Explanation:
In counting semaphore,Wait operations will decrease the value and signal operations will increase the value.
Initially counting semaphore value is 8.
= 8 – 3 + 4
= 5 + 4
= 9
Quiz of this Question
Please comment below if you find anything wrong in the above post
Article Tags :
Uncategorized
Recommended Articles