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

计算机工程 ›› 2011, Vol. 37 ›› Issue (14): 271-273. doi: 10.3969/j.issn.1000-3428.2011.14.092

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

μC/OS-II中优先级位图算法的改进

陈艳辉,涂晓东,王 卫   

  1. (电子科技大学通信与信息工程学院,成都 611731)
  • 收稿日期:2011-02-22 出版日期:2011-07-20 发布日期:2011-07-20
  • 作者简介:陈艳辉(1984-),女,硕士研究生,主研方向:嵌入式操作系统,光纤存储网络;涂晓东,副教授;王 卫,硕士研究生

Improvement of Priority Bit Map Algorithm in μC/OS-II

CHEN Yan-hui, TU Xiao-dong, WANG Wei   

  1. (College of Communication & Information Engineering, University of Electronic Science & Technology of China, Chengdu 611731, China)
  • Received:2011-02-22 Online:2011-07-20 Published:2011-07-20

摘要: 针对基于查表方式的优先级位图算法占用存储空间较大的问题,提出2种能够减少存储空间占用的改进算法。改进算法1通过去除原表中的冗余数据,缩小表格的大小;改进算法2完全脱离查表思想,采用一种新的方法获得当前具有最高优先级的就绪态任务。分析结果表明,优化后的算法可以有效节省系统的存储空间。

关键词: 优先级位图, 查表, 存储空间, C语言

Abstract: Two enhanced algorithms are proposed to solve the problem that the lookup table based priority bit map algorithm occupies a large storage space. One of the optimized algorithms reduces the size of the table by remove the redundant data from table. The other optimized algorithm gets the highest priority task which is in the ready state by a new method. It completely rejects the way of Lookup-table. Analysis result shows the enhanced algorithm can save a large storage space.

Key words: priority bit map, lookup table, storage space, C programming language

中图分类号: