modularized_scheduler.doxy 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*! \page ModularizedScheduler Modularized Scheduler
  2. \section Introduction
  3. Scheduler are a tree-like structure of homogeneous nodes that each
  4. provides push and pop primitives. Each node may have one father by
  5. context, specially worker nodes ase they are shared between all contexts.
  6. Tasks make a top bottom traversal of tree.
  7. A push call on a node make either a recursive call on one of its
  8. childs or make the task stored in the node and made available to a
  9. pop, in this case that node should call available to wake workers
  10. up. Push must be called on a child, and only if this child can execute
  11. the task.
  12. A pop call on a node can either return a localy stored task or perform
  13. a recursive call on its father in its current context. Only workers
  14. can call pop.
  15. \section Initialization
  16. The scheduler is initialized with all workers, and workers are then
  17. added or removed by simply masking them.
  18. Scheduler nodes are created by <tt> starpu_sched_node_foo_create(void
  19. \* arg) </tt>, arg may be stored in starpu_sched_node::data
  20. The starpu_sched_node::init_data is the last function to be called during
  21. initialization, it can use starpu_sched_node::workers and
  22. starpu_sched_node::data.
  23. \section Push
  24. All scheduler node must define a starpu_sched_node::push_task
  25. function. The caller ensure that the node can realy execute the task.
  26. \section Pop
  27. starpu_sched_node::push_task should either return a local task or
  28. perform a recursive call on
  29. starpu_sched_node::fathers[sched_ctx_id], or \c NULL if its a root
  30. node.
  31. \section WorkersAndCombinedWorkers Workers and Combined workers
  32. Leafs are either a worker node that is bind to a starpu workers or a
  33. combined worker node that is bind to several worker nodes.
  34. Pushing a task on a combined worker node will in fact push a copy of
  35. that task on each worker node of the combined worker.
  36. A push call simply enqueue task in worker queue, no sort is performed
  37. here.
  38. If a worker call pop and get a parallel task, it will execute it with the
  39. combined worker it belong to.
  40. */