MCQ1 mark
Two processes X and Y need to access a critical section. Consider the following synchronization construct used by both the processes
Process X Process Y
/* other code for process X */ /* other code for process Y */
while(true) while(true)
{ {
varP = true; varQ = true;
while(varQ == true) while(varP == true)
{ {
/* Critical Section */ /* Critical Section */
varP = false; varQ = false;
} }
} }
/* other code for process X */ /* other code for process Y */
Here, varP and varQ are shared variables and both are initialized to false. Which one of the following statements is true?Single correct