Open In App

UGC-NET | UGC NET CS 2018 July – II | Question 51

Like Article
Like
Save
Share
Report

At a particular time of computation, the value of a counting semaphore is 10. Then 12 P operations and “x” V operations were performed on this semaphore. If the final value of semaphore is 7, x will be:
(A) 8
(B) 9
(C) 10
(D) 11


Answer: (B)

Explanation: Initially, the value of a counting semaphore is 10 Now 12 P operation are performed.
Now counting semaphore value = -2
“x” V operations were performed on this semaphore and final value of counting semaphore = 7
i.e x + (-2) = 7
x = 9.
So, option (C) is correct.

Quiz of this Question


Last Updated : 06 Sep, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads