Details on the Fork-Join Structure

In Doug Lee's article “Fork / Combine Core”:

http://gee.cs.oswego.edu/dl/papers/fj.pdf

In 2.1 "Theft of Work," he says:

When a worker thread encounters a merge operation, processes other tasks , if available, until it finds the target task completed (via isDone). All tasks otherwise complete without blocking.

can anyone tell me specifically where these "other tasks" are ? Are they from the queues of tasks of other workers? Does this mean that when the desktop encounters a connection call, it continues to "steal tasks from other threads" instead of "skipping to other tasks in its queue"?

+3
source share
2 answers

"Other tasks" may arise due to their own deck, when there are pending tasks, other thread requests, or from the queue for sending new requests.

Compound () is a rather complicated procedure. It includes task management, that is, the ability to manage tasks when they are active in processing and pauses, waiting for something. Doing this in an application usually doesn't work. (Operating systems do this well, but Cilk, JCilk do this using a compiler / runtime.) Doug Lea uses "thread continuation" when combining workflow threads.

+2
source

Fork/Join , Deque.

, ( ), . , , . thread ( ). , , , . .

0

All Articles