Course Solutions Uncategorized (Solved) : Draw Dependence Graph Corresponding Following Program Public Class Program Public Class R1 Q31608167 . . . .

(Solved) : Draw Dependence Graph Corresponding Following Program Public Class Program Public Class R1 Q31608167 . . . .

 

Draw the dependence graph corresponding with the followingprogram:
public class Program {
public class R1 implements Runnable {
public void run() { A(); B(); }
}
public class R2 implements Runnable {
public void run() { C(); barrier.await(); D(); }
}
public class R3 implements Runnable {
public void run() { E(); t2.start(); F(); }
}
private Thread t2;
private CyclicBarrier barrier;
public Program() {
barrier = new CyclicBarrier(2, new R1());
t2 = new Thread(new R2());
}
public void runIt() {
Thread t3 = new Thread(new R3());
t3.start();
G();
t3.join();
H();
barrier.await();
I();
t2.join();
J();
}
public static void main(String[] args) {
Program p = new Program();
p.runIt();
}
}
The vertices should be the functions A, B, etc rather than thetasks.

Expert Answer


An answer will be send to you shortly.

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post