Two-level Priority Scheduling Algorithm for μ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.
real time operating systemμC/OS-Ⅱpriority scheduling algorithmreal-time