任务计划程序 [英] Task Schedulers

查看:92
本文介绍了任务计划程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与一些同事就最佳的实时任务调度策略进行了有趣的讨论,但并不是每个人都对通用或有用的调度策略有很好的了解.

Had an interesting discussion with some colleagues about the best scheduling strategies for realtime tasks, but not everyone had a good understanding of the common or useful scheduling strategies.

对于您的答案,请选择一种策略并对其进行详细介绍,而不要提供有关几种策略的一些信息.如果您要在其他人的描述中添加一些简短内容,请添加评论而不是新答案(如果篇幅较长或有用,或者只是一个更好的描述,请使用答案)

For your answer, please choose one strategy and go over it in some detail, rather than giving a little info on several strategies. If you have something to add to someone else's description and it's short, add a comment rather than a new answer (if it's long or useful, or simply a much better description, then please use an answer)

  • 策略是什么-描述一般情况(假设人们知道任务队列是什么,信号量,锁以及调度程序本身之外的其他OS基础知识)
  • 此策略有哪些优化(任务延迟,效率,实时性,抖动,资源共享等)
  • 是实时的还是实时的

当前策略:

  • Priority Based Preemptive
  • Lowest power slowest clock

-亚当

推荐答案

如题为,描述了具有多种处理器速度和功耗配置文件的低功率(嵌入式)设备中实时任务调度的挑战.他们概述的调度算法(并且被证明比测试中的最佳解决方案仅差约1%)具有一种有趣的调度任务的方式,称为LEDF启发式.

As described in a paper titled Real-Time Task Scheduling for Energy-Aware Embedded Systems, Swaminathan and Chakrabarty describe the challenges of real-time task scheduling in low-power (embedded) devices with multiple processor speeds and power consumption profiles available. The scheduling algorithm they outline (and is shown to be only about 1% worse than an optimal solution in tests) has an interesting way of scheduling tasks they call the LEDF Heuristic.

摘自论文

低能耗最早的截止日期 启发式或简称为LEDF 最早的扩展名 截止期限第一(EDF)算法.这 LEDF的操作如下:LEDF 维护所有已发布清单 任务,称为就绪列表".什么时候 任务被释放,任务与 选择最近的截止日期为 被执行.执行检查以查看 如果任务截止日期可以通过 在较低的电压下执行 (速度).如果能按时完成, LEDF将较低的电压分配给 任务,任务开始执行. 在执行任务期间,其他 任务可能会进入系统.这些 假定任务已放置 自动显示在准备就绪列表"上. LEDF再次使用 要执行的最接近的截止日期.作为 只要有任务等待着 执行后,LEDF不会保留 祖先闲着.重复此过程 直到完成所有任务 预定的.

The low-energy earliest deadline first heuristic, or simply LEDF, is an extension of the well-known earliest deadline first (EDF) algorithm. The operation of LEDF is as follows: LEDF maintains a list of all released tasks, called the "ready list". When tasks are released, the task with the nearest deadline is chosen to be executed. A check is performed to see if the task deadline can be met by executing it at the lower voltage (speed). If the deadline can be met, LEDF assigns the lower voltage to the task and the task begins execution. During the task’s execution, other tasks may enter the system. These tasks are assumed to be placed automatically on the "ready list". LEDF again selects the task with the nearest deadline to be executed. As long as there are tasks waiting to be executed, LEDF does not keep the pro- cessor idle. This process is repeated until all the tasks have been scheduled.

并使用伪代码:

Repeat forever {
    if tasks are waiting to be scheduled {
        Sort deadlines in ascending order
        Schedule task with earliest deadline
        Check if deadline can be met at lower speed (voltage)
        If deadline can be met,
            schedule task to execute at lower voltage (speed)
        If deadline cannot be met,
            check if deadline can be met at higher speed (voltage)
        If deadline can be met,
            schedule task to execute at higher voltage (speed)
        If deadline cannot be met,
            task cannot be scheduled: run the exception handler!
    }
}

随着小型低功耗设备的普及,实时调度似乎是一个有趣且不断发展的问题.我认为这是一个我们将看到大量进一步研究的领域,我期待与时俱进!

It seems that real-time scheduling is an interesting and evolving problem as small, low-power devices become more ubiquitous. I think this is an area in which we'll see plenty of further research and I look forward to keeping abreast!

这篇关于任务计划程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆