Computer and Modernization ›› 2024, Vol. 0 ›› Issue (06): 33-37.doi: 10.3969/j.issn.1006-2475.2024.06.006

Previous Articles     Next Articles

Two-level Priority Scheduling Algorithm for μC/OS-II

  


  1. (1. School of Information and Software Engineering, University of Electronic Science and Technology of China, Chengdu 610054, China; 2. Chengdu Lian’an Tech Co.,LTD, Chengdu 610054, China)
  • Online:2024-06-30 Published:2024-07-17

Abstract: Abstract: μC/OS-II 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-II 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 system in some cases, and may even cause security risks to the system operation. This paper extended the two-level priority scheduling mechanism for μC/OS-II by improving the priority bitmap structure and scheduling algorithm of μC/OS-II. The improved system 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. Experiments prove that the algorithm can effectively improve the concurrency and resource utilization of μC/OS-II, while maintaining low system overhead and response time.

Key words: Key words: real time operating system, μC/OS-II, priority scheduling algorithm, real-time

CLC Number: