瀏覽代碼

note about modular scheduler locking

Samuel Thibault 6 年之前
父節點
當前提交
11b2d3da42
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      doc/doxygen/chapters/350_scheduling_policy_definition.doxy

+ 14 - 0
doc/doxygen/chapters/350_scheduling_policy_definition.doxy

@@ -299,6 +299,20 @@ Scheduler :
 	Scheduler. Resource-Mapping Components are the only ones which can make
 	Scheduler. Resource-Mapping Components are the only ones which can make
 	scheduling choices, and so the only ones which can have several child.
 	scheduling choices, and so the only ones which can have several child.
 
 
+\subsubsection ModularizedSchedulerLocking Locking in modularized schedulers
+
+Most often, components do not need to take locks. This allows e.g. the push
+operation to be called in parallel when tasks get released in parallel from
+different workers which have completed different ancestor tasks.
+
+When a component has internal information which needs to be kept coherent, the
+component can define its own lock at take it as it sees fit, e.g. to protect a
+task queue. This may however limit scalability of the scheduler. Conversely,
+since push and pull operations will be called concurrently from different
+workers, the component might prefer to use a central mutex to serialize all
+scheduling decisions to avoid pathological cases (all push calls decide to put
+their task on the same target)
+
 \subsubsection ImplementAModularizedScheduler Implementing a Modularized Scheduler
 \subsubsection ImplementAModularizedScheduler Implementing a Modularized Scheduler
 
 
 The following code shows how the Tree-Eager-Prefetching Scheduler
 The following code shows how the Tree-Eager-Prefetching Scheduler