标签:
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