Previous | Next --- Slide 51 of 64
Back to Lecture Thumbnails
apr

Does this mean that when there is a cilk_sync, the continuation only includes everything upto the call to sync?

Suppose cilk is implemented with child first, then if the above is not true, then couldn't any other thread (through work stealing) end up running the call to sync?

Same question, but when there is no sync call, and suppose cilk is implemented with child first, does that mean that whichever thread ends up calling foo(9) would place its continuation (call to bar) in its queue? If there is another thread which is free, that thread would take up bar, and continue execution of the program, and it could potentially even be on a different core, from where it started off intially?

EDIT: Understood from subsequent slides, that cilk does use the greedy join scheduling policy. In the absence of a cilk_sync, there would be no way for the initial program to wait to continue executing the program, hence it would have to be similar to the greedy join policy.