1 votes 1 votes int x=0; int y=0; parbegin begin x=1; y=y+x; end begin y=4; x=x+5; end parend what could be the final values of x and y after operations of the above concurrent prog? a. x=1 y=5 b x=6 y=10 c x=6 y=5 d x=1 y=4 nimesh kumar asked Oct 27, 2016 nimesh kumar 339 views answer comment Share Follow See 1 comment See all 1 1 comment reply Lokesh . commented Oct 27, 2016 reply Follow Share is it C?? 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes initialy x=0; and y=0; let p1 parbegin begin 1. x=1; 2. y=y+x; end let p2 begin 1. y=4; 2. x=x+5; end parend p1 - 1 | p2- 1,2 end | p1- 2 end it gives X=6 Y=10 ans (B) Rajesh Raj answered Oct 27, 2016 Rajesh Raj comment Share Follow See all 2 Comments See all 2 2 Comments reply kirti singh commented Oct 29, 2016 reply Follow Share but if we execute in this way P1-1 x=1 P2-1 y=4 P1-2 y=5 P2-2 x=6 which makes option C.. 0 votes 0 votes Rajesh Raj commented Oct 29, 2016 reply Follow Share yeah . this way the answer (C) could be right 0 votes 0 votes Please log in or register to add a comment.