|
Sharing Patterns
- Producer-consumer (initially flag, done are zero)
T0: while (!exit) {x=y; flag=1; while (done != k);
flag=0; done=0;}
T1 to Tk : while (!exit) {while (!flag);
use x;
done++; while (flag);}
- Exit condition not shown
- What if T1 to Tk do not have the outer loop?
- Migratory (initially flag is zero)
T0: x = f0(x); flag++;
T1 to Tk : while (flag != pid ); x = f1(x); flag++;
Migratory Hand-off
- Needs a memory writeback on every hand-off
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|