Thermal and QoS-Aware Embedded Systems