The producer and consumer processes share the following variables: int n…

The producer and consumer processes share the following variables: int n Semaphore M = 1 Semaphore E = n Semaphore F = 0

The consumer process must execute ____ and ____ before removing an item from buffer.

  1. A.

    signal(M), signal(F)

  2. B.

    signal(M), wait(F)

  3. C.

    signal(F), wait(M)

  4. D.

    wait(F), wait(M)

Attempted by 87 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…