There are certain conditions for concurrency. Here we have listed them for you in this article.
Conditions for Concurrency
Example #1
Consider the statement.
The read set:
The write set:
The intersection of
Example #2
Consider following statement:
The read set:
The write set:
Bernstein’s Conditions
The following three conditions must be satisfied for two successive statements
. . .
Example:
Consider the following statements.
In the example above, all three conditions are satisfied. Therefore, the statement
We could use the precedence graph, but the precedence graph cannot be used in programming as it is a two-dimensional object. Moreover, it only shows the dependency relationship between statements.