Name: _____________________________ 6 Digit StudentID: ___ ___ ___ ___ ___ ___

Worksheet 03: Computation Graph

For the code below draw the computation graph.

s1();
Future<Void> a = void_fork(() -> {
    s2();
    s3();
});
Future<Void> b = void_fork(() -> {
    s4();
});
s5();
Future<Void> c = void_fork(() -> {
    s6();
    Future<Void> d = void_fork(() -> {
        s7();
    });
    s8();
    join(d);
    s9();
});
s10();
join(a, b, c);
s11();

What can run in parallel?

Work, Span, Ideal Parallelism

Assume that the work of fork and join are relatively insignificant and 0 work. Further, assume that the statements s1-s11 are 1 work each.

Post Lecture

Synthesize today's class session

 

 

What is unclear?