针对嵌入式多任务实时控制系统,提出模糊调度设计(FSD)算法。该算法基于任务重要性和空闲时间2个特征参数,动态调整任务优先级,使得空闲时间越短且越重要的任务,其优先级越高。FSD算法在资源有限时可以提高关键任务的可调度性和控制性能,在不同系统负载下,通过灵活的模糊调度规则获得满意的系统可调度性能。为评估调度算法,定义性能指标,IVR为任务价值总和与任务重要性之和的比值,若IVR越大,则系统可调度性越好。仿真结果表明:在正常负载下,FSD算法在保证关键任务可调度性的同时,对非关键任务的可调度性影响较小,任务调度成功率比MIX(加权组合)算法的高;超载时,FSD算法优先保证关键任务在其截止期内完成,避免EDF(截止期优先)算法中易出现的多米诺现象发生,有效提高系统的整体性能。
A FSD (Fuzzy scheduling design) algorithm was presented focusing on the embedded multi-task real-time control systems, the scheduling decision was conduced based on both the importance value and the slack of the tasks, the task priority was dynamically changed such that the slack was shorter or the task was more important, and the priority was higher. The critical tasks' control index and schedulability were improved within limited resource by FSD algorithm, and the satisfied schedulability of the system was obtained under different workloads by the flexible fuzzy scheduling rules. The performance of the scheduling algorithm IVR was evaluated by computing the ratio of the cumulative value to the cumulative importance value gained on a task set, and the higher the IVR was, the better the system's schedulability was. Simulation results show that, with the proposed FSD algorithm, the influence on the non-critical tasks' schedulability is smaller during the guarantee of the critical tasks' schedulability under normal workload, besides, a higher succeeding ratio of task scheduling is achieved compared with that using MIX (Mixed rules) algorithm. Moreover, FSD algorithm guarantees the critical tasks to be completed by their deadlines, avoids the so called domino effect which usually appears in EDF (Earliest deadline first) policy and improves the efficiency of the overall system performance under overload condition.