0 0 votes Operating System + – `JEET 941 views answer comment Share Follow Print See all 5 Comments 5 5 Comments reply Show 2 previous comments Shaik Masthan commented Jan 17, 2019 reply Follow flag Tag me correctly ! There is a sequence of execution, which leads to BOTH P1 and P2 terminates. There is a sequence of execution, which leads to P1 terminates but not P2 terminates. There is NO sequence of execution possible, which leads to P1 not terminates but P2 terminates. Given answer is right ! 1 1 replyShare `JEET commented Jan 17, 2019 reply Follow flag Tag me correctly? I tagged you correctly, right? 0 0 replyShare `JEET commented Jan 17, 2019 reply Follow flag @Shaik Masthan Also, didn't understand how you concluded all the above statements. Can you please explain further. 0 0 replyShare Please log in or register to add a comment.
1 1 vote Here as we can see P1 increases x by 1 and gets out of loop if x>=y. And P2 increases y by 1 and gets out of loop if x==y. As we can see that P1 can get executed by making x==y, but P2 can not get executed i.e. it will never come out of loop because when x==y then P2 first increases y by 1, making x!=y thus never coming out of loop. Thus, statement (c) is FALSE. Animesh Sinha answered Jan 17, 2019 Animesh Sinha comment Share Follow 0 reply Please log in or register to add a comment.