The following program consists of 3 concurrent processes and 3 binary…

GATE · 2010 · CS · Computer Science & IT

The following program consists of 3 concurrent processes and 3 binary semaphores. The semaphores are initialized as S0 = 1, S1 = 0, S2 = 0.

image.png

How many times will process P0 print ‘0’?

  1. A.

    At least twice

  2. B.

    Exactly twice

  3. C.

    Exactly thrice

  4. D.

    Exactly once

Attempted by 280 students.

Show answer

Correct answer: A

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…