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

问题描述

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

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.

摘自论文

并使用伪代码:

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!

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