Minimizing energy consumption is an important issue in the design of real-time embedded systems. As many embedded systems are powered by rechargeable batteries, the goal is to extend, as much as possible, the autonomy of the system. Recently, many scheduling algorithms have been proposed in the literature to exploit the capability of some processor to dynamically change its operating voltage and frequency. The goal of the scheduling algorithm is to select not only the task to be scheduled, but also the operating frequency, so minimizing the energy consumed without jeopardizing the schedulability of the real-time tasks. In this paper we present GRUB-PA, a new scheduling algorithm for power-aware systems. The algorithm can efficiently handle systems consisting of hard and soft real-time tasks. In addition, tasks can be periodic, sporadic or aperiodic. The algorithm reclaims the spare bandwidth caused by periodic tasks that execute less than expected or by sporadic tasks that arrive less...