节点文献

实时操作系统中实时调度算法及其资源管理的研究

Research on Real-time Scheduling Algorithm and Resource Management of Real-time System

【作者】 周本海

【导师】 王溪波;

【作者基本信息】 沈阳工业大学 , 计算机软件与理论, 2007, 硕士

【摘要】 实时系统主要面向现实世界中与时间因素相关的应用需求。它所关注的不仅是计算结果在逻辑上的正确性,而且还有输出结果时间的及时性。相应的处理过程必须在规定的时间限制内完成,否则系统将崩溃。此外,实时系统中,多任务共享资源时很容易出现无限优先级反转现象,最终导致系统崩溃。因此,任务调度与资源管理是实时系统最重要的组成部分。本文选择μC/OS-Ⅱ实时内核作为研究对象。μC/OS-Ⅱ实时内核以抢占的方式调度任务,并且是开放源代码的。它为每个任务分配唯一的优先级,不支持相同优先级任务的调度。而在实际应用中,为相同功能的任务分配不同的优先级不是一个很好的逻辑设计。因此本文扩展了μC/OS-Ⅱ实时内核,使其支持相同优先级的轮转调度,从而实现了μC/OS-Ⅱ中固定优先级抢占和同优先级轮转调度方式相结合的一种混合调度策略。通过实验验证,扩展后的μC/OS-Ⅱ实时内核能够支持相同优先级任务的轮转调度,并且仍然能够保持μC/OS-Ⅱ抢占式内核的特点。基于优先级抢占调度策略的实时内核中,优先级反转是涉及多任务共享资源时最容易出现的现象,此现象是实时应用系统产生不可预知错误的重要因素。本文阐述了μC/OS-Ⅱ实时内核中优先级反转问题产生的原因和对系统实时性的影响,提出了调度器加锁、优先级置顶和优先级继承三种抑制μC/OS-Ⅱ优先级反转的实现方法。通过实验验证,这三种方法能够有效地抑制μC/OS-Ⅱ中的优先级反转。最后对三种实现方法的性能进行了分析、比较。

【Abstract】 Real-time systems are mainly designed to satisfy the timing requirements from the real word application. A real-time system concerns not only the logic correctness of the computing results, but also the time when the results come out. The process must be completed before deadline, or the system will failed. Otherwise, in real-time system, priority inversion phenomenon may occur frequently under the condition of multiple tasks share resource, and it will lead to system failure. So task scheduling and resource management is the most important part.This paper useμC/OS-II as the reaserch object.μC/OS-II has a preemptive scheduling and free code kernel.μC/OS-II assigns each task for an unique priority, but it does not allow the kernel to have multiple tasks at the same priority. In practical application, it is not a good logical design. Aiming at this problem, by modifying the real time kernelμC/OS-II, this paper advanced round-robin scheduling to deal with the same priority tasks. By experiment verification, the modified kernel can support the tasks at the same priority, and it can remainμC/OS-II’s preemptive property.For real-time kernel adopting preemptive priority policy, priority inversion phenomenon may occur frequently under the condition of multiple tasks share resource. Some unpredictable errors of real-time application system perhaps derive from this phenomenon. This paper expounds the cause of priority inversion problem and the effect for real-time system performance firstly, and then, three approaches named as scheduler lock , priority ceiling protocol and priority inheritance protocol are proposed to be used inμC/OS- II for reducing the priority inversion phenomenon. By experiment verification, the three methods reduce priority inversion effectively inμC/OS- II. Finally, the performance of the three methods had been compared and analyzed.

  • 【分类号】TP316.2
  • 【被引频次】13
  • 【下载频次】359
节点文献中: 

本文链接的文献网络图示:

本文的引文网络