/*! \page ModularizedScheduler Modularized Scheduler


\section Introduction

Scheduler are a tree-like structure of homogeneous nodes that each
provides push and pop primitives. Each node may have one father by
context, specially worker nodes as they are shared between all contexts.

Tasks make a top bottom traversal of tree.

A push call on a node make either a recursive call on one of its
childs or make the task stored in the node and made available to a
pop, in this case that node should call starpu_sched_node_available to wake workers
up. Push must be called on a child, and only if this child can execute
the task.

A pop call on a node can either return a localy stored task or perform
a recursive call on its father in its current context. Only workers
should call pop.


\section Initialization
Scheduler node are created with the starpu_sched_node_foo_create() functions
and then must be assembled using them starpu_sched_node::add_child and
starpu_sched_node::remove_child function.
A father can be set in order to allow him to be reacheable by a starpu_sched_node::pop_task
call.

Underlayings workers are memoized in starpu_sched_node::workers. Hence the
function starpu_sched_tree_update_workers should be called when the scheduler is
finished, or modified.

\section Adding and removing workers





\section Push
All scheduler node must define a starpu_sched_node::push_task
function. The caller ensure that the node can realy execute the task.


\section Pop
starpu_sched_node::push_task should either return a local task or
perform a recursive call on
starpu_sched_node::fathers[sched_ctx_id], or \c NULL if its a root
node.


\section WorkersAndCombinedWorkers Workers and Combined workers

Leafs are either a worker node that is bind to a starpu workers or a
combined worker node that is bind to several worker nodes.

Pushing a task on a combined worker node will in fact push a copy of
that task on each worker node of the combined worker.

A push call simply enqueue task in worker queue, no sort is performed
here.
If a worker call pop and get a parallel task, it will execute it with the
combined worker it belong to.
*/