面向实时操作系统μC/OS-Ⅱ的两级优先调度算法OACSTPCD
Two-level Priority Scheduling Algorithm for μC/OS-Ⅱ
μC/OS-Ⅱ采用抢占式优先级调度算法,根据任务的重要程度分配不同的优先级,以确保系统的实时性.但μC/OS-Ⅱ不允许多个任务具有相同优先级,不仅限制了并发任务的数量和灵活性,而且在某些情况下会增加系统的复杂度,甚至可能给系统的运行造成安全隐患.本文通过改进μC/OS-Ⅱ的优先级位图结构与调度算法,为μC/OS-Ⅱ扩展了2级优先调度机制.改进后的系统允许用户为多个任务赋予相同的优先级,同一优先级下的任务按照二级优先级进行调度,且可以根据实际需要灵活选择二级调度策略.实验表明,该算法可有效提高μC/OS-Ⅱ的并发能力和资源利用率,同时保持较低的系统开销和响应时间.
μC/OS-Ⅱ uses a preemptive priority scheduling algorithm that assigns different priorities to tasks according to their importance to ensure the real-time performance of the system.However,μC/OS-Ⅱ does not allow multiple tasks to have the same priority,which not only limits the number and flexibility of concurrent tasks,but also increases the complexity of the sys-tem in some cases,and may even cause security risks to the system operation.This paper extended the two-level priority schedul-ing mechanism for μC/OS-Ⅱ by improving the priority bitmap structure and scheduling algorithm of μC/OS-Ⅱ.The improved sys-tem allows users to assign the same priority to multiple tasks.Tasks under the same priority are scheduled according to the second-level priority,and the second-level scheduling policy can be flexibly selected according to the actual needs.Experi-ments prove that the algorithm can effectively improve the concurrency and resource utilization of μC/OS-Ⅱ,while maintaining low system overhead and response time.
李启明;杨霞;房文宇;孙海泳
电子科技大学信息与软件工程学院,四川 成都 610054成都链安科技有限公司,四川 成都 610096
计算机与自动化
实时操作系统μC/OS-Ⅱ优先级调度算法实时性
real time operating systemμC/OS-Ⅱpriority scheduling algorithmreal-time
《计算机与现代化》 2024 (006)
33-37 / 5
国家自然科学基金资助项目(U19A2078);四川省科技厅科技成果转化项目(2023ZHCG0005,2023ZHCG0008)
评论