码迷,mamicode.com
首页 > 其他好文 > 详细

Scheduling Policies --- (Note)

时间:2015-10-16 13:25:16      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:

Scheduling policy is a balancing act between competing goals. Modern scheduling policies

make tradeoffs between three primary goals: fairness, low latency and progress. Other goals

exist, but these three are often the most important. Fairness concerns how CPU cycles are

divided over some time scale (e.g. one second, one minute, one hour). A task‘s portion of 

cycles over a given time period is called its CPU allocation. There is no quantitative definition

of fairness. A policy‘s fairness can be measured in how closely and at what time scale it matches

a desired allocation; the smaller the time scale the greater the perceived fairness. Scheduling

latency is how long a taks must wait before it is given control of the CPU. Latency is most

important for interactive tasks because high latencies result in frustrated users. Progess measures

the work a task can accomplish in a given time period. In the extreme case, called starvation,

a task may take no progress at all. A scheduling policy must make tradeoffs between these goals.

For example, a scheduling policy that prioritizes interactive tasks to reduce latency may provide

unfair allocations that also lead to starvation. As another example, a scheduler that provides

fair allocation over a small time scale may hurt progress by increasing the number of context

switches. CPU schedulers fall into two broad categories: real-time and best-effort.

Scheduling Policies --- (Note)

标签:

原文地址:http://www.cnblogs.com/miaoyong/p/4884980.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!