引用本文:陈熙,乔磊,杨孟飞,刘洪标.基于避让阻塞的优先级天花板协议.软件学报,2023,34(7):3422-3437
【打印本页】   【下载PDF全文】   查看/发表评论  【EndNote】   【RefMan】   【BibTex】
←前一篇|后一篇→ 过刊浏览    高级检索
本文已被:浏览 1448次   下载 3693 本文二维码信息
码上扫一扫!
分享到: 微信 更多
基于避让阻塞的优先级天花板协议
陈熙1, 乔磊1, 杨孟飞2, 刘洪标1,3
1.北京控制工程研究所, 北京 100190;2.中国空间技术研究院, 北京 100094;3.西安电子科技大学 计算机科学与技术学院, 陕西 西安 710071
摘要:
为了提高空间飞行器计算机的CPU利用率,新一代空间飞行器操作系统使用了一种同时包含固定时间点启动任务和偶发任务的混合调度算法.其中固定时间点启动任务往往是安全攸关任务,需要在固定时间点启动,且执行期间不能被阻塞.在固定时间点启动任务和偶发任务共存的条件下,现有的实时锁协议无法保证固定时间点启动任务的阻塞时间为零,因此在经典的优先级天花板协议的基础上,提出基于避让思想的实时锁协议,通过提前预判和设置虚拟启动点的方式,确保偶发任务对共享资源的访问不会影响到固定时间点启动任务的执行.同时暂时提升部分共享资源的访问优先级,降低了任务抢占所带来的运行开销.给出上述锁协议的最坏阻塞时间,并通过可调度率实验分析其性能,实验表明,在临界区较短的情况下,本协议可将因访问共享资源而导致的可调度性损失控制在27%以内.
关键词:  优先级天花板协议  资源同步协议  实时调度  固定时间点启动  避让阻塞
DOI:10.13328/j.cnki.jos.006534
分类号:TP306
基金项目:国家自然科学基金(62032004,61632005)
Priority Ceiling Protocol Based on Avoidance Blocking
CHEN Xi1, QIAO Lei1, YANG Meng-Fei2, LIU Hong-Biao1,3
1.Beijing Institute of Control Engineering, Beijing 100190, China;2.China Academy of Space Technology, Beijing 100094, China;3.School of Computer Science and Technology, Xidian University, Xi'an 710071, China
Abstract:
In order to improve the CPU utilization of spacecraft computers, the new generation of spacecraft operating system uses a hybrid scheduling algorithm that includes both fixed-point starting tasks and sporadic tasks. Among them, fixed-point starting tasks are often safety-critical tasks and need to be started at fixed points and cannot be blocked during execution. Under the condition that fixed-point starting tasks and sporadic tasks coexist, the existing real-time lock protocols cannot guarantee that the blocking time of fixed-point starting tasks is zero, so on the basis of the classic priority ceiling protocol, a real-time lock protocol based on the idea of avoidance blocking is proposed in this study to ensure that sporadic tasks’ access to shared resources will not affect the execution of fixed-point starting tasks by judging in advance and setting virtual starting point. At the same time, by temporarily increasing the access priority of some resources, the cost caused by task preemption can be reduced. This study presents the worst blocking time of the above lock protocol and uses the schedulable rate experiments to analyze its performance. Experiments show that in the case of short critical sections, this protocol can control the schedulability loss caused by accessing shared resources to under 27%.
Key words:  priority ceiling protocol  resource synchronization protocols  real-time scheduling  fixed-point starting  avoidance blocking