Skip to content
Related Articles
Open in App
Not now

Related Articles

UGC-NET | NTA UGC NET 2019 June – II | Question 25

Improve Article
Save Article
  • Last Updated : 03 Dec, 2021
Improve Article
Save Article

At a particular time of computation, the value of a counting semaphore is 7. Then 20 P(wait) operations and 15 V(signal) operations are completed on this semaphore. What is the resulting value of the semaphore?
(A) 28
(B) 12
(C) 2
(D) 42


Answer: (C)

Explanation: Value of a counting semaphore = 7
After 20 P operations value of semaphore = 7 – 20 = -13
After 15 V operations value of semaphore = -13 + 15 = 2
So, option C is correct.

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!