Consider the following solution for critical section problem with 'n' processes P0,P1,P2,......P(n-1).For all i,number[i] is an integer array initialized to zero, and for all j,choosing[j] is a binary array initialized to false.
CODE FOR Pi :
for j=0 to n-1
while(choosing[j]) do nothing;
while(number[j]!=0 and (number[j],i) < (number[i], i))
consider the following statements about above solution:
S1:solution preserve first come first serve property.
S2:solution follows mutual exclusion condition.
S3:solution leads to starvation.
Which of the following is correct.
b)S1 and S2 only.
c)S2 and S3 only.
d)S1 , S2 and S3
(please anyone elaborate this solution.thanks in advance)