Gate CS-2016-2 Question Paper With Solutions

Q. 59 Consider a non-negative counting semaphore S. The operation P(S) decrements S, and V(S) increments S. During an execution, 20 P(S) operations and 12 V(S) operations are issued in some order. The largest initial value of S for which at least one P(S) operation will remain blocked is ________.

(A) 7

(B) 8

(C) 9

(D) 10

Answer: (A)

Explanation:

Gate CS-2016-2 Question Paper With Solutions

Learn More:   Gate EE-2014-3 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here