zoukankan      html  css  js  c++  java
  • Scheduling Policies --- (Note)

    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.

    Schedulers in the real-time category provide guarantees about how long it will take to respond to

    an event; these schedulers ensure the application-defined deadlines are always met. Real-Time

    schedulers are typically found in environment requiring latency guarantees, like robotics and

    embeded systems. To provide these guatantees, real-time schedulers need to know the CPU

    allocation and latency requirements of an application requires, the application is not run. This

    admission control policy limits the concurrency of real-time systems.

    Best-Effort schedulers, in contrast, provide no guarantees; their primary goal is ease-of-use.

    Because they provide only best-effort service, they require no a priori knowledge of application

    latency or allocation requirements. Best-effort schedulers also do not have adimission control

    mechanisms to prevent CPU contention. These schedulers are found in all commodity operating

    systems and used by both desktop and server class machines. Best-effort schedulers are commonly

    divided into three groups: time-sharing, proportional-share, and both.

  • 相关阅读:
    简体繁体互译代码段:
    require.js使用baseUrl + paths导入文件配置的3种方法
    vue + vue-router + vue-resource 基于vue-cli脚手架 --->笔记
    解决webstorm卡顿问题
    js 函数闭包内部返回函数体调用方法难点解答
    java学习笔记之位运算符
    java集合类学习笔记之LinkList
    java集合类学习笔记之ArrayList
    java学习笔记之对象序列化
    springboot集成巨杉数据库
  • 原文地址:https://www.cnblogs.com/miaoyong/p/4884980.html
Copyright © 2011-2022 走看看