A real-time multitasking operating system requires much nore rapid response to external events than other operating systems. So it is very important to select an appropriate task scheduling algorithm.In this paper,a round-robin preemptive priority scheduling algorithm is analyzed,which will lead to priority inversion when multiple tasks seeking access to shared resources use the semaphore mechanism.Priority inheritance is proposed to resolve the problem whose efficiency and practicability have been proved in our practice in our practice and examination.%实时多任务操作系统相对于其他操作系统而言,需要有更快的对外部事件的反应能力.因此,选择一种合适的任务调度算法非常重要.本文分析了时间片轮转的优先级抢占任务调度算法,以及控制共享资源访问的信号量机制.如果多个任务访问共享资源,可能会导致优先级反转.最后,提出了解决优先级反转的途径:优先级继承.试验证明,该方法行之有效.
展开▼