OS-based Energy Accounting for Asynchronous Resources in IoT Devices
Rapid advancements in computing, communication, sensing and actuation have seen the growth of IoT devices in our daily life. One of the fundamental constraints of a typical IoT device is energy as IoT devices rely on a battery. Therefore it is crucial for their Operating System (OS) to be able to accurately account for system-wide energy usage. Specifically, the OS should be able to attribute such accounted energy to the running applications accurately. Traditional OSs have limited capability when it comes to tracking components such as sensors, actuators and network interfaces, as they are often used in an asynchronous fashion. This would make it difficult to conduct energy accounting accurately. This paper proposes a new mechanism to accurately account for the asynchronous energy usage of resources in mobile systems and IoT devices. Our insight is that by accurately relating the application requests with kernel requests to device and corresponding device responses, we can accurately attribute time of use to the requesting process. However, resources such as WiFi reception violate this assumption. In such cases, we can measure usage by the number of bytes in each individual transaction. Using such a hybrid approach, we can account for energy usage with 94% accuracy and perform much better than using each of these models individually.