Time management is very much important in IIT JAM. The eduncle test series for IIT JAM Mathematical Statistics helped me a lot in this portion. I am very thankful to the test series I bought from eduncle.
Nilanjan Bhowmick AIR 3, CSIR NET (Earth Science)
Aparna 1
In process synchronization, Flag[ ] array of size N that is false by default Therefore, the flag of a process needs to be set true, whenever it wants to enter the critical section. A variable TURN tells the process number waiting to enter the Critical section. When a process enters the Critical Section, it changes the TURN to another number from the list of ready processes when it is existing. Whenever a process requires to enter in the critical section it has to set it's flag as true. Eg. - If Pi wants to enter it will set. FLAG[i] = TRUE TURN The variable is used to indicate the process number that is currently waiting to enter into the critical section. The process that enters into the critical section while exiting would change the TURN to another number from the list of processes that are ready. Eg :- If the tuen is 3 then P3 enter into Critical S section & while exiting then turn=4 and therefore P4 breaks out of the loop.