This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Otherwise the process continues execution with the next statement. Example: The fork/join implementation of a precedence graph is shown below. S 1 ; S S 1 count1:=2; fork L1; S 2 ; S 4 ; count2:=2; S 2 S 3 fork L2; S 5 ; Go to L3; L1: S 3 ; L2: join count1; S 4 S 6 S 6 ; L3: join count2; S 7 ; S 5 S 7 Cobegin/coend Cobegin/coend construct allows concurrent execution of all program blocks enclosed. At cobegin all program blocks begin concurrent execution and at coend all of them must complete execution before the next block may begin execution. Example: The cobegin/coend implementation of a precedence graph is shown below. S 1 begin S 1 ; cobegin S 3 ; begin S 2 ; S 2 S 3 cobegin S 4 ; S 5 ; coend; S 6 ; S 4 S 5 end; coend; S 7 ; end; S 6 S 7...
View Full Document
- Fall '08
- Operating Systems, Zürich Hauptbahnhof, Zürich Stadelhofen, Precedence graph