717 views
2 votes
2 votes

1 point

The variable turn can have values 0 or 1

  Void Process (i)

     {

     while(1)

        {

          //Non-critical section

           While (turn!=i);

                //     Critical section

            turn = j;

        }

}

The above code does not provide

 1. Mutual exclusion

 2. Progress

 3. Bounded wait

 4. None of these

1 Answer

0 votes
0 votes

1.ME-true ,because only turn can have value either 0 or 1 which ensure ME

2-Progress-False, because let suppose  turn =1 for process j but j dont want to critical section whereas i wants to enter but it has to wait for j

3.Bounded Waiting-true, Because no other can enter into critical section more than once continuously as turn value is changing after critical section

so answer is B

Related questions

2 votes
2 votes
1 answer
1
1 votes
1 votes
0 answers
2
Hirak asked May 9, 2019
749 views
0 votes
0 votes
4 answers
3
gulsanchouhan asked Oct 14, 2017
1,979 views
If the value of a counting semaphore s = 4, then the maximum number of requests for the critical section before it blocks is _____________ ?1. 02. 13. 24. 4
1 votes
1 votes
3 answers
4
gulsanchouhan asked Oct 13, 2017
812 views
State True/False Bakery algorithm ensures that no process is starved.1. True2. False