closed by
579 views
0 votes
0 votes
closed as a duplicate of: GATE CSE 2010 | Question: 45

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

Process P0

Process P1

Process P2

While (true)

{

wait (S0);

print '0';

release S1;

release S2;

}

Wait (S1);

release (S0);

Wait (S2);

release (S0);

How many time process P0 print '0'?

a. Exactly 2 time

b. Exactly 3 time

c. Atleast 2 time

c. Atleast 3 time

closed by

Related questions

0 votes
0 votes
1 answer
1
N3314nch41 asked Sep 10, 2023
359 views
How to approach synchronization (specifically semaphore) question, there size are really intimidating and i’m unable to decode the code written? What to do??