Consider the solution to the bounded buffer producer/consumer problem by using…

GATE · 2006 · IT

Consider the solution to the bounded buffer producer/consumer problem by using general semaphores S, F, and E. The semaphore S is the mutual exclusion semaphore initialized to 1. The semaphore F corresponds to the number of free slots in the buffer and is initialized to N. The semaphore E corresponds to the number of elements in the buffer and is initialized to 0.

image.png

Which of the following interchange operations may result in a deadlock?

  1. Interchanging Wait (F) and Wait (S) in the Producer process

  2. Interchanging Signal (S) and Signal (F) in the Consumer process

  1. A.

    I Only

  2. B.

    II Only

  3. C.

    Neither I nor II

  4. D.

    Both I and II

Attempted by 177 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…