The above solution is STARVATION-FREE right ??? Because both the processes will eventually get into the Critical-section and there is no indefinite waiting time for any process ....AM I CORRECT ? PLEASE CORRECT ME IF I AM WRONG ...
EDIT IN QUESTION : in P1's code, 2nd while will have semi-colon...(i.e) while(turn!=1); not while(turn!=1)