这表示,当可运行任务数大于latency_nr时,将线性延长调度周期。
That is, when there are more than latency_nr runnable tasks, the scheduling period is linearly extended.
因此,每个可运行的任务都会追赶其他任务以维持整个可运行任务集合的执行平衡。
Therefore, each runnable task chases the other to maintain a balance of execution across the set of runnable tasks.
因此,如果每个可运行任务运行与sched_slice等价的时间,那么将花费的时间为sched _ period,每个任务将运行与其权重成比例的时间量。
So, if each runnable task runs its sched_slice worth of time, it has spent sched_period time, and each task will have run an equal amount of time proportional to its weight.
红黑树的叶子不包含信息,但是内部节点代表一个或多个可运行的任务。
Leaves in a red-black tree contain no information, but internal nodes represent one or more tasks that are runnable.
dequeue _ task:当某个任务退出可运行状态时调用该函数,它将从红黑树中去掉对应的调度实体,并从nr_running变量中减1。
Dequeue_task: When a task is no longer runnable, this function is called to keep the corresponding scheduling entity out of the red-black tree. It decrements the nr_running variable.
因此,当一个新任务变为可运行状态时,对其位置有严格的要求。
So when a new task becomes runnable, there are strict requirements for its placement.
任务通过将其运行时间添加到虚拟运行时,说明其占用CPU的时间,然后如果可运行,再插回到树中。
The task accounts for its time with the CPU by adding its execution time to the virtual runtime and is then inserted back into the tree if runnable.
例如,如果具有4个可运行的任务,那么fair_clock将按照实际时间速度的四分之一增加。
For example, if you have four runnable tasks, then fair_clock will increase at one quarter of the speed of wall time.
但是因为不是所有任务都是可运行的,您在task_struct中不会发现任何与CFS相关的字段。
But because not all tasks are runnable, you won't find any CFS-related fields in task_struct.
FactoryTestServlet:一个简单的示例,显示如何创建WASThreadFactory 并向其提交大量的可运行线程任务。
FactoryTestServlet: A simple example that shows how to create the WASThreadFactory and submit a number of Runnable tasks to it.
FactoryTestServlet:一个简单的示例,显示如何创建WASThreadFactory 并向其提交大量的可运行线程任务。
FactoryTestServlet: A simple example that shows how to create the WASThreadFactory and submit a number of Runnable tasks to it.
应用推荐