Question 51
51. 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 :
Answer : (2) 9 Previous | Next |
UGC NET CS 2018 July - II Question 50 | UGC NET CS 2018 July - II Question 52 |
Intially 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
Final value of counting semaphore = 7
∴ ( “x” V operations + current counting semaphore value (-2) ) = 7
∴ x + (-2) = 7
∴ x = 7 + 2
∴ x = 9.
So, option (2) is correct answer.