With scaling of semiconductor fabrication technologies and the push towards deep sub-micron technologies, individual transistors are now composed by a small number of atoms. This makes it difficult to achieve precise control of manufacturing quality, with the added consequence that even slight differences in manufacturing can result in significant fluctuation in critical device and circuit parameters (such as power, performance, and error characteristics) of parts across the die, die-to-die and over time due to changing operating conditions and age-related wear-out. Instance and temperature-dependent variation, particularly in power consumption, has a direct impact on application quality and system lifetime for battery powered, energy constrained systems.
In this work we discuss software approaches to handle variability in power consumption of embedded systems. We characterize power variation in contemporary embedded processors, introduce tools for the evaluation of variability-aware software, and focus on two variability-aware software approaches: task activation control through variability-aware duty cycle scheduling and algorithmic choice.
We measured and characterized active and leakage power for a contemporary ARM Cortex M3 processor, and found that across a temperature range of 20-60°C there is 10% variation in active power, and 14x variation in leakage power. As embedded processors in more advanced technologies become commonplace, the variations will increase significantly.
While contemporary hardware already suffers from variability, the evaluation of a variability-aware software stack faces two main challenges: first, commercially available platforms typically do not provide means to sense or discover variability. Second, even if this sensing capability was available, evaluating a software stack across a statistically significant number of hardware samples and ambient conditions would prove exceedingly costly and time consuming. We introduce VarEMU, an extensible framework for the evaluation of variability-aware software that provides users with the means to emulate variations in power consumption and fault characteristics and to sense and adapt to these variations in software.
We introduce variability aware duty cycling methods and a duty cycle abstractions for embedded operating systems (TinyOS and FreeRTOS) that allow applications to to explicitly specify lifetime and minimum duty cycle or quality requirements for individual tasks, and dynamically adjust duty cycle rates and task activation schedules so that overall quality of service is maximized in the presence of power variability. We show that variability-aware duty cycling yields a 3-22x improvement in total active time over schedules based on worst-case estimations of power, with an average improvement of 6.4x across a wide variety of deployment scenarios based on collected temperature traces. Conversely, datasheet power specifications fail to meet required lifetimes by 7-15%, with an average 37 days short of a required lifetime of one year. Finally, we show that a target localization application using variability-aware duty cycle yields a 50% improvement in quality of results over one based on worst-case estimations of power consumption.
In addition to task activation control though duty cycling, a choice of software to be executed provides further opportunities for optimization. We introduce ViRUS (Virtual function Replacement Under Stress), an application runtime support system that adjusts service quality according to variability-aware policies. In ViRUS, different code paths implement the same function with varying quality-of-service for different energy costs. Mutations from one version to another are triggered by monitoring vectors of variability and energy stress. We demonstrate ViRUS with a framework for transparent function replacement in shared libraries and a polymorphic version of the standard C math library in Linux. Application case studies show how ViRUS can tradeoff upwards of 4% degradation in application quality for a band of upwards of 50% savings in energy consumption.