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