Prerequisite – Introduction of Process Synchronization
PARBEGIN/PAREND statement is a higher-level language construct for specifying concurrency. All statements can be executed concurrently those are enclosed between PARBEGIN and PAREND. It is used in modelling precedence graph. It is used as an alternative for the FORK/JOIN statement.
PARBEGIN/PAREND is also called COBEGIN/COEND.
Consider the following program:
S0; PARBEGIN; S1; S2; ... Sn-1; PAREND; Sn;
The above program is equivalent to the following precedence graph.
Construct the precedence graph for the following parbegin/parend program.
begin S1; parbegin S3; begin S2; parbegin S4; S5; parend; S6; end; parend; S7; end;
Advantages of Parbegin/Parend –
- It is a high-level language block-structure.
- It has the advantage of structured control statements.
- Semaphores mechanism is also one of the advantages.
Disadvantages of Parbegin/Parend –
- It is not powerful enough to model all possible precedence graph.
- It is less powerful than the FORK/JOIN construct in modelling precedence graph.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Concurrent Processes in Operating System
- Concurrent Program with Precedence Graph
- Difference between Batch Processing and Stream Processing
- Difference between Multitasking and Multiprocessing
- Calculate server loads using Round Robin Scheduling
- Difference between Multiprocessing and Multiprogramming
- Difference between Batch Processing OS and Multiprogramming OS
- Difference between Batch Processing System and Online Processing System
- Layered Operating System
- Getting hash of a file using CMD
- Difference between Time Sharing OS and Multiprogramming OS
- Difference between Multiprogramming and Multithreading
- Address Binding and its Types
- Performance of paging
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.