GATE CS 2016, set 2 · Question 59 · Operating System · Numerical answer (NAT) · 2 marks · no negative marks

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 ______ .

Answer

Answer 7

Answer from the official GATE CS 2016 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes