The Peterson's solution to the critical section problem,
Init: flag[2]={False} //two process problem
Init turn=i or j.
do {
flag [i] = TRUE;
turn= j;
while (flag[j] && turn==j);
critical section
flag [i] = FALSE;
remainder section
} while (TRUE);
hence there is no guarantee that this algorithm will work efficiently on Modern Architecture systems.(Ref:- Galvin Book Page No - 229 ), Why so, can somebody help me out?