480 views
0 votes
0 votes

Each Process Pi, i = 1....91....9 is coded as follows

while(TRUE)
{ 
    P(mutex)
    {Critical section}
    V(mutex)
}

The code for P10 is 

while (TRUE)
{ 
    v(mutex)
    {Critical section}
    p(mutex)
}

. What is the largest number of processes that can be inside the critical section at any moment?

  1. 1
  2. 2
  3. 3
  4. 10

1 Answer

1 votes
1 votes

Initially mutex = 1

Let ,

P1 enters by P operation---> mutex=0

P10 enters by V operation ---> mutex=1

P2 enters by P operation ---> mutex=0

This is the one case where 3 process are present in critical section

Related questions