Allocation cost minimization for periodic hard real-time tasks in energy-constrained DVS systems