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.

  • 相关阅读:
    fwt
    fft,ntt
    loj6077
    高维前缀和
    hihocoder 1496 寻找最大值
    HDU 5977 Garden of Eden
    扩展crt
    有标号的DAG计数I~IV
    BZOJ 3160 万径人踪灭
    Codeforces Round #524 (Div. 2) F
  • 原文地址:https://www.cnblogs.com/miaoyong/p/4884980.html
Copyright © 2011-2022 走看看