实时任务在实际应用中通常需要以独占方式访问共享资源,但是由于资源的独占性导致高优先权任务运行时往往被低优先权任务阻塞,从而产生优先权反转,难以满足任务的实时性;同时当前处理器由于较高的能量消耗,导致处理器热量散发提高及系统可靠性降低,已经成为目前计算机领域较为关心的问题。提出一种基于任务同步及节能的实时调度算法CSSFA,有效地解决了上述难题。CSSFA在满足任务实时可调度性及任务同步的条件下,固定临界区的运行速度,使更多的空闲时间用于非临界区部分,有效地降低了整体系统的能耗;同时也能避免高优先权任务被阻塞、临界区继承高优先权任务的速度时所造成的处理器电压开关的频繁切换,因而能有效地降低实时任务调度的成本。试验测试表明,CSSFA在调度性能上明显优于目前所知的有效算法。
Real-time tasks usually synchronize to access shared resources in a mutually exclusive manner in real applications, But this exclusive access makes the task with high priority be blocked by one with low priority, which inevitably leads to priority inversion and deadline misses. Meanwhile, the high power consumption of modern processors has been a major concern due to the fact that it leads to increased heat dissipation and decreased reliability of systems. This paper proposed an algorithm, CSSFA ( critical section speed fixed algorithm) , to cope with the difficulties mentioned above. CSSFA fixed the processor frequency when running critical sections under the condition that the real-time schedulability and task synchronization were satisfied, so that more slack times could be used to non critical sections to reduce the energy consumption of the overall systems efficiently. On the other hand, the processor frequency' s fixation of critical sections prevented the frequent voltage switching, which was caused by the frequency inheritance, when a task with low priority blocked the task with high priority. Thus, the scheduling costs could also be reduced efficiently. The experiment result indicates that the proposed algorithm obviously outperforms other algorithms so far in terms of scheduling performance.