The flags variable for each process is set to WAITING whenever it takes to enter the critical section . flags intends either IDLE or WAITING or ACTIVE .
The flags variable for each process is set to WAITING whenever it intends to enter the critical section . flags takes either IDLE or WAITING or ACTIVE .