Process X:private i;for (i=0; i<n; i++) { a[i] = f(i); ExitX(R, S);}Process Y:private i;for (i=0; i<n; i++) { EntryY(R, S); b[i] = g(a[i]);}