Skip to content
Related Articles

Related Articles

Improve Article

ISRO | ISRO CS 2017 – May | Question 78

  • Last Updated : 21 Mar, 2018
Geek Week

At particular time, the value of a counting semaphore is 10, it will become 7 after:
(a) 3 V operations
(b) 3 P operations
(c) 5 V operations and 2 P operations
(d) 2 V operations and 5 P operations
Which of the following option is correct?
(A) Only (b)
(B) Only(d)
(C) Both (b) and (d)
(D) None of these


Answer: (C)

Explanation: P: Wait operation decrements the value of the counting semaphore by 1.
V: Signal operation increments the value of counting semaphore by 1.
Current value of the counting semaphore = 10
a) after 3 P operations, value of semaphore = 10-3 = 7
d) after 2 v operations, and 5 operations value of semaphore = 10 + 2 – 5 = 7
Hence option (C) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :