Question: S1: a := 7; S2: b := 2; S3: c := 3; S4: read(d); S5: a := b + 2; S6: b := a -
S1: a := 7;
S2: b := 2;
S3: c := 3;
S4: read(d);
S5: a := b + 2;
S6: b := a - 3;
S7: c := d / b;
S8: e := a + 2;
S9: print(e);
S10: print(c);
1. Give the statement-level dependence graph for the above program. A node in the statement-level dependence graph represents a statement, an edge represents dependence between the statements (nodes). Label each edge as a true data dependence, an anti data dependence, or an output data dependence.
2. Assume that each statement takes 1 cycle to execute. What is the execution time of the sequential code? What is the fastest parallel execution time of the program (critical path)? You may assume that I/O operations (read, print) can be done in parallel.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
