Concurrency and Precedence Graph

When more than one processes are running parallel in a system, then this state is known as concurrency that allow multiple application to share resources. This is based on multiprogramming system. As we have described before that a process can be either concurrent process or independent process. Independent process does not share resources with any other process.

 

There are at least two types of operations supported on a process that are process creation and process termination. A parent process can create child processes.

 

There are two examples of concurrent processes that are interleaved processes and overlapped processes. The relative speed of execution depends on the activities of the other processes, i.e., handling interrupts, scheduling policies etc.

 

         40.jpg

 

Sharing resources is difficult for operating system, however we have better resource utilization, better average response time, and better performance. It also has some drawbacks, i.e., non-atomic operations, race- condition can be occurred, a process can block waiting for resources. Starvation and deadlock situation can also be occurred.

Precedence Graph

A precedence graph is a directed graph acyclic graph where edge represents execution order and node represents individual statements of the program code.

 

For example: consider the following statements;

(S1): a = x + y ;

(S2): b = a + z ;

(S3): c = x - y ;

(S4): w = b + c ;

 

Precedence graph:

 

       41.jpg

 

Contributor's Info

Created:
0Comment