Skip to content
Related Articles

Related Articles

Improve Article

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

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :