GATE | GATE CS 1996 | Question 69
Last Updated :
06 Nov, 2017
The concurrent programming constructs fork and join are as below:
fork <label>Â Â Â Â Â which creates a new process executing from the specified label
join <variable>Â Â which decrements the specified synchronization variable (by 1) and terminates the process if the new value is not 0.
Show the precedence graph for S1, S2, S3, S4, and S5 of the concurrent program below.
N = 2
M = 2
fork L3
fork L4
S1
L1:join N
S3
L2:join M
S5
L3:S2
goto L1
L4:S4
goto L2
next:
Answer:
Explanation:
Quiz of this Question
Please comment below if you find anything wrong in the above post
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...