1 votes 1 votes what is difference between in both question...? it is totally look same just difference in variable. https://gateoverflow.in/1256/gate2007-58 https://gateoverflow.in/8405/gate2015-3-10 Operating System process-synchronization + – bhavnakumrawat5 asked Sep 17, 2018 bhavnakumrawat5 561 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Shaik Masthan commented Sep 17, 2018 reply Follow Share in the 2007 question, while (wants2 == true); it means, if wants2=true ====> P1 is in continuous loop in the 2015 question, while (varQ == true) { /* Critical Section */ varP = false; } VarQ=true ====> X entered in Critical Section. wants1 = true; while (wants2 == true); /* Critical Section */ wants1 = false; equivalent to wants1 = true; while (wants2 == true) { } /* Critical Section */ wants1 = false; BUT IT IS NOT EQUVIVALENT TO wants1 = true; while (wants2 == true) { /* Critical Section */ wants1 = false; } ( this is GATE2015 Question ) 3 votes 3 votes bhavnakumrawat5 commented Sep 17, 2018 reply Follow Share I got it...thanks... 0 votes 0 votes Please log in or register to add a comment.