edited by
556 views
0 votes
0 votes
Let Flag is declared Boolean Flag[2]

Process Pi                                                                     Process Pj

while(true)                                                             while(true)
{                                                                             {                                                                                               
flag[i]=true;                                                             flag[j]=true;
while(flag[j]);                                                           while(flag[i]);

<critical section>                                                   <critical section>

flag[i]=false;                                                            flag[j]=false;

<remainder section>                                              <remainder section>
}                                                                             }
 

 

The above solution satisfies:

a Mutual Exclusion only

b Mutual exclusion and bound waiting satisfy only

c Mutual exclusion, progress only

d Progress only
edited by

Please log in or register to answer this question.

Related questions

1 votes
1 votes
0 answers
1
ADITYA CHAURASIYA 5 asked Oct 3, 2017
340 views
A computer system has the following characterstics :Uses 10GB disk that rotate at1000RPM Have data transfer rate of 10MB/s (for each disk) and have 8ms seek time
0 votes
0 votes
1 answer
3
pream sagar asked Sep 7, 2018
269 views