2
The intuitive informal description of two process Peterson's algorithm for process 0 can be given as follows: flag[0]=true; //I am ready to enter my critical region turn=1; //but you may take your turn to enter your critical section while(flag[1]==true &&