作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2009, Vol. 35 ›› Issue (12): 266-268. doi: 10.3969/j.issn.1000-3428.2009.12.093

• 开发研究与设计技术 • 上一篇    下一篇

μC/OS-Ⅱ系统中任务调度与监控机制改进

吴永明,罗海据   

  1. (广东工业大学机电工程学院,广州 510006)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2009-06-20 发布日期:2009-06-20

Improvement of Task Scheduling and Supervision Mechanism in μC/OS-Ⅱ System

WU Yong-ming, LUO Hai-ju   

  1. (Faculty of Electro-mechanical Engineering, Guangdong University of Technology, Guangzhou 510006)
  • Received:1900-01-01 Revised:1900-01-01 Online:2009-06-20 Published:2009-06-20

摘要: 针对μC/OS-Ⅱ系统的任务调度机制局限于只能按照优先级顺序执行,其任务监控机制可能因外界接口环境异常而出现死锁等问题,提出一些改进方法,包括在系统中增加一个负责任务调度的优先级最低的任务,以便灵活控制任务的调度。增加时间限制变量来控制任务的执行时间,以避免任务发生死锁时导致整个系统的崩溃。该系统已应用于一款按摩椅产品的控制系统之中,结果证明这些方法是实用可行的。

关键词: 任务调度, 任务监控, 嵌入式操作系统

Abstract: In the μC/OS-Ⅱsystem, the task scheduling mechanism is to execute tasks just according to the tasks’ priority, and the task supervision mechanism may happen unexpected dead-lock accidents because of abnormities of interface to outside environment. In order to solve these problems, some improvement methods are proposed. A new task having the lowest priority is added to the system to take charge of task scheduling agilely, and a variable of time limitation is added to the task data structure to control the task running time for avoiding system breakdown when the task dead-lock happens. The improved system is applied to a massage-chair control system successfully. It illustrates the proposed methods are feasible.

Key words: task scheduling, task supervision, embedded OS

中图分类号: