difficult - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.


Hi I have a syntactic question here that I cant figure out

int x = 0; sem s1 = 1, s2 = 0;
co P(s2); P(s1), x=x*2, V(s1);
// P(s1); x = x*x; V(s1);
// P(s1); x = x + 3; V(s2); V(S1);

what is the possible final answers of x ???

this is parallel computing language for parallel processes...co stands for concurrency and oc its the end of it, the V and P operations is as follows:

P(S): 0) s = s - 1;>

Sign In or Register to comment.