Home » Operating Systems » Operating systems miscellaneous » Question

Operating systems miscellaneous

  1. 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 _________.
    1. 7
    2. 11
    3. 17
    4. 0
Correct Option: A

S = – 20 + 12 = – 8
∴ The highest intial value of S for which atleast one P(S) operation remains blocked is 7.



Your comments will be displayed only after manual approval.