Example: Two Processors x par (y x y is evaluated on P1 x is taken up for evaluation on P2 x is sparked on p1
x y is evaluated on P1 y x is taken up for evaluation on P2 x x is sparked on P1 P1 P2 x `par` (y + x)
Model: two processors a par spark for a created thread 1 eval b thread2 eval a spark converted to thread tme一
Model: one processor f par(f+e) spark for f created thread eval f eval e eval f+e No extra resources so spark for f fizzle
No extra resources, so spark for f fizzles
No parallelism? f par(f+e) spark for f created thread1 eval f eval e X evalf+e thread2 Main thread demands f, so spark fizzles
Main thread demands f, so spark fizzles
Lucky parallelism f par(e +f) spark for f created thread1 eva vale+f thread2 eva lucky! spark for f instantiated onto thread