As described in a document called Real-time job scheduling for energy-efficient embedded systems , Swaminathan and Chakrabarty describe real-time problems scheduling tasks in low-power (embedded) devices with multiple processor speeds and power profiles. The scheduling algorithm they describe (and, as shown, is only 1% worse than the optimal solution in tests) has an interesting way of scheduling tasks, which they call the LEDF heuristic.
From the article:
The earliest deadline with the least energy heuristic or simply LEDF, is an extension of the well-known early deadline first (EDF) algorithm. LEDF's work is as follows: LEDF maintains a list of all issued tasks, called a "ready-made list." when tasks are released, the task with the next deadline selected is executed. A check is performed to see if the deadline for the task can be satisfied by performing it at a lower voltage (Speed). If the deadline can be satisfied, the LEDF assigns a lower voltage to the task, and the task starts execution. During the execution of tasks, other tasks may be logged on. These are assumed to have tasks automatically in the "finished list." The LED again selects the task using the nearest deadline for execution. As long as there are tasks waiting to be completed, LEDF does not support a bachelor. This process is repeated until all tasks are completed planned.
And in the pseudo code:
Repeat forever { if tasks are waiting to be scheduled { Sort deadlines in ascending order Schedule task with earliest deadline Check if deadline can be met at lower speed (voltage) If deadline can be met, schedule task to execute at lower voltage (speed) If deadline cannot be met, check if deadline can be met at higher speed (voltage) If deadline can be met, schedule task to execute at higher voltage (speed) If deadline cannot be met, task cannot be scheduled: run the exception handler! } }
Real-time scheduling seems to be an interesting and evolving problem, as small devices with low power are becoming more common. I think this is an area in which we will see a lot of further research, and I look forward to being in the know!
source share