261 views
0 votes
0 votes

Consider the below solution to two process mutual exclusion problem:-

Program for Pi:

Program for Pj:

Do{

Do{

P: Flag[i]=true;            

A: Flag[j]=true;

Q: turn=j;

B: turn=i;

While(flag[j]&&turn=j);

While(flag[i]&&turn=i);

<C.S.>

<C.S.>

Flag[i]=false

Flag[j]=false

}while(true);

}while(true);

S1: It satisfies mutual exclusion.

S2: It satisfies progress.

S3: It satisfies bounded waiting.

How many  statements are correct?

S1 is false i know plz explain statement S2 and S3

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
1
Rajucse asked Jul 1, 2018
152 views
Does producer-consumer work on only two processes(one producer,one consumer)?
5 votes
5 votes
4 answers
2
Neha Sisodiya asked Jul 7, 2015
2,856 views
const int n = 5; int count = 0; void test(){ for i = 1 to n count += 2; } main() { Par begin test(); test(); test(); Par end }What can be the maximum and minimum value of...