Adaptive Dynamic Voltage Scaling for Real-Time Systems