Is the following solution correct to solve the critical sect…
Is the following solution correct to solve the critical section problem? Please briefly explain. Proc (int i) { while (TRUE){ compute; while (turn != i); critical_section; turn = (i+1) mod 2; } } shared int turn; turn = 1; fork(proc, 1, 0); fork(proc, 1, 1);