计算机工程与应用 ›› 2009, Vol. 45 ›› Issue (16): 90-92.DOI: 10.3778/j.issn.1002-8331.2009.16.025

• 研发、设计、测试 • 上一篇    下一篇

提高实时内核对实时任务响应时间的新方法

郑晓曦,张 虎,鲍松堂   

  1. 五邑大学 信息学院,广东 江门 529020
  • 收稿日期:2008-04-07 修回日期:2008-09-05 出版日期:2009-06-01 发布日期:2009-06-01
  • 通讯作者: 郑晓曦

New method of reducing real-time kernel latency for real-time task

ZHENG Xiao-xi,ZHANG Hu,BAO Song-tang   

  1. Department of Information,Wuyi University,Jiangmen,Guangdong 529020,China
  • Received:2008-04-07 Revised:2008-09-05 Online:2009-06-01 Published:2009-06-01
  • Contact: ZHENG Xiao-xi

摘要: 提出了一种延迟锁方法,以减小实时内核对周期性实时任务的响应时间。该技术的基本策略为:只让那些不影响实时任务的非实时任务进入非抢占临界区。为实现该策略,引入了定时器中断预测和锁持有时间的概念。此外,还设计了一种用于该策略的紧急定时器。最后将该策略原型在Linux2.6内核中实施,实验结果显示,在最差的情况下,Linux对实时任务的响应时间比原来降低了23%,同时,对非实时任务的响应时间比原来增加20%。

关键词: 延迟锁, 自旋锁, 实时Linux, 响应时间

Abstract: A new method called delayed lock is proposed,to reduce the latency of real-time task in real-time kernel.The basic rule of this method is that a non-real-time task entering a critical section is allowed only if the operation does not disturb the future execution of the real-time application.To execute this rule,this paper introduced the concepts of timer interrupt prediction and lock hold time.In addition,the paper also designed and implemented a new urgent timer for this technique,and the prototype on Linux 2.6.Experimental results show that the worst-case Linux’s latency to real-time process is reduced to 23%,at the expense of slowdown of the non-real-time process by 20%.

Key words: delayed lock, spin-lock, real-time Linux, latency