The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+7 votes
797 views

Draw the precedence graph for the concurrent program given below

S1
parbegin
    begin
        S2:S4
    end;
    begin
        S3;
        parbegin
            S5;
            begin
                S6:S8
            end
       parend
   end;
   S7
parend;
S9
asked in Operating System by Veteran (59.9k points)
edited by | 797 views

2 Answers

+15 votes
Best answer

parbegin-parend shows parallel execution while begin-end shows serial execution

answered by Active (3.2k points)
selected by
+1
please explain procedure of drawing that instead of directly drawing it , thanks
0
There should be a begin before S1 and end after S9 right ...? If not given, should we take it defaultly ...???
+1
S1
parbegin  (parbegin=parallel beginning , after this parallel beginning of S2, S3,S7 started)             
    begin
        S2:S4   (S2:S4  it means S4 occur after S2 in serial order ) 
    end;
    begin           
        S3;
        parbegin    (here S5 and S6 start in parallel order after  the S3  )
            S5;
            begin
                S6:S8   (serial)
            end
       parend       
   end;
   S7
parend;     
S9

conclusion  ,the content between the parbegin and parend start in parallel  and content between begin and end run in serial 

ex given is the subpart of the given module for the expalanation 

 parbegin
       S5;
       begin (after starting S5,S6 in parallel order ,S8 start in serial order after the S6 )
       S6:S8
       end
 parend
0

@Gurdeep Saini nice explanation

–4 votes

12.a) picture will be like above. Here perbegin-perend creates when there are more than one child processes, and begin-end creates  a process

answered by Veteran (108k points)
+5
This above graph is wrong because s7 will run in parallel with first and second begin-end blocks.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
47,903 questions
52,285 answers
182,209 comments
67,715 users