Precedence graphs are
Precedence graphs are used to ensure that different processes are able to run concurrently without any error or
To guarantee concurrency and prevent deadlock in these processes (as one process uses variables of the other process), the precedence relation should be created such that no process is disturbed. P3 can not be executed before variables a and b are assigned some values. Similarly, P4 also can not be processed before the variable c value has been calculated. However, since P1 and P2 are independent of each other, they can be executed concurrently, as shown below:
In the operating system, precedence graphs are used to prevent