Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Notes  >  Operating System  >  Parbegin/Parend Concurrent statement

Parbegin/Parend Concurrent statement | Operating System - Computer Science Engineering (CSE) PDF Download

Introduction

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. 

Note: 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. 

Parbegin/Parend Concurrent statement | Operating System - Computer Science Engineering (CSE)

Example: 
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;
Explanation: 

Parbegin/Parend Concurrent statement | Operating System - Computer Science Engineering (CSE)

We can also Parbegin two process –
Void P( )     Void Q( )
{                      {
A;                        D;
B;                        E;
C;                    }
}
The relative order among the statements of P & Q is always maintained

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.

The document Parbegin/Parend Concurrent statement | Operating System - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Operating System.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
10 videos|99 docs|33 tests

Top Courses for Computer Science Engineering (CSE)

FAQs on Parbegin/Parend Concurrent statement - Operating System - Computer Science Engineering (CSE)

1. What is a concurrent statement in Computer Science Engineering (CSE)?
Ans. A concurrent statement in CSE refers to a type of program statement that allows multiple actions or processes to occur simultaneously. It enables different parts of a program to execute concurrently, improving efficiency and utilization of system resources.
2. How does a concurrent statement differ from a sequential statement in CSE?
Ans. In CSE, a concurrent statement allows multiple actions or processes to occur simultaneously, whereas a sequential statement executes actions or processes in a specific order, one after the other. Concurrent statements are suitable for parallel programming and can improve performance in certain scenarios.
3. What are some commonly used concurrent statement constructs in CSE?
Ans. Some commonly used concurrent statement constructs in CSE include parallel loops, task-based parallelism, multithreading, and message passing. These constructs enable the execution of multiple tasks or processes concurrently, allowing for efficient utilization of system resources and improved performance.
4. How can concurrent statements improve the performance of computer systems in CSE?
Ans. Concurrent statements in CSE can improve performance by utilizing multiple processors or cores effectively. By allowing tasks or processes to execute concurrently, the overall execution time of a program can be reduced. This can lead to faster computation, better resource utilization, and improved scalability.
5. What are the challenges associated with using concurrent statements in CSE?
Ans. Using concurrent statements in CSE introduces challenges such as synchronization, data sharing, and potential race conditions. Proper synchronization mechanisms, such as locks or semaphores, need to be implemented to ensure correct and consistent behavior of concurrent programs. Additionally, careful consideration of data sharing and potential race conditions is required to avoid conflicts and ensure data integrity.
10 videos|99 docs|33 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

ppt

,

practice quizzes

,

Parbegin/Parend Concurrent statement | Operating System - Computer Science Engineering (CSE)

,

study material

,

Free

,

Parbegin/Parend Concurrent statement | Operating System - Computer Science Engineering (CSE)

,

Important questions

,

mock tests for examination

,

pdf

,

Semester Notes

,

MCQs

,

video lectures

,

Sample Paper

,

past year papers

,

Parbegin/Parend Concurrent statement | Operating System - Computer Science Engineering (CSE)

,

Viva Questions

,

Exam

,

Summary

,

Objective type Questions

,

Previous Year Questions with Solutions

,

shortcuts and tricks

,

Extra Questions

;