Abstract
Most consumer-based mobile devices use asynchronous events to awaken apps. Currently, event handling is implemented in either an application or an application framework such as Java’s virtual machine (VM) or Microsoft’s .NET, and it uses a “polling loop” that periodically queries an event queue to determine if an event has occurred. These loops must awaken the process, check for an event, and then put the process back to sleep many times per second. This constant arousal prevents the CPU from being put into a deep sleep state, which increases power consumption. Additionally, the process cannot check for events while it sleeps, and this delay in handling events increases latency, which is the time that elapses between when an event occurs and when the application responds to the event. We call this model of event handling a “pull” model because it needs to query hardware devices or software queues in order to “pull” events from them. Recent advances in input devices support direct, informative interrupts to the kernel when an event occurs. This allows us to develop a much more efficient event-handling model called the “Event Stream Model” (ESM). This model is a push model that allows a process to sleep as long as no event occurs but then immediately awakens a process when an event occurs. This model eliminates the polling loop, thus eliminating latency-inducing sleep between polls and reducing unnecessary power consumption. To work properly, the ESM model must be implemented in the kernel rather than in the application. In this article, we describe how we implemented the ESM model in Android operating system (OS). Our results show that with the event stream model, power consumption is reduced by up to 23.8% in certain circumstances, and latency is reduced by an average of 13.6ms.
- Ibrahim Alagöz, Christoffer Löffler, Vitali Schneider, and Reinhard German. 2014. Simulating the energy management on smartphones using hybrid modeling techniques. In Proceedings of the 17th International GI/ITG Conference on Measurement, Modelling, and Evaluation of Computing Systems and Dependability and Fault Tolerance (MMB 8 DFT’14). 207--224. DOI:http://dx.doi.org/10.1007/978-3-319-05359-2_15 Google Scholar
Digital Library
- ARM 2013. ARM Generic Interrupt Controller (2.0 ed.). ARM.Google Scholar
- Tero Arpinen, Erno Salminen, Timo D. Hämäläinen, and Marko Hännikäinen. 2012. MARTE profile extension for modeling dynamic power management of embedded systems. J. Syst. Arch. 58, 5 (Apr. 2012), 209--219. DOI:http://dx.doi.org/10.1016/j.sysarc.2011.01.003 Google Scholar
Digital Library
- Major Bhadauria and Sally A. McKee. 2008. Optimizing thread throughput for multithreaded workloads on memory constrained CMPs. In Proceedings of the 5th Conference on Computing Frontiers (CF’08). ACM, New York, NY, 119--128. DOI:http://dx.doi.org/10.1145/1366230.1366256 Google Scholar
Digital Library
- William Lloyd Bircher and Lizy John. 2012. Predictive power management for multi-core processors. In Proceedings of the 2010 International Conference on Computer Architecture (ISCA’10). Springer-Verlag, Berlin, 243--255. DOI:http://dx.doi.org/10.1007/978-3-642-24322-6_21 Google Scholar
Digital Library
- Aaron Carroll and Gernot Heiser. 2010. An analysis of power consumption in a smartphone. In Proceedings of the USENIX Annual Technical Conference. Boston, MA, 271--284. Google Scholar
Digital Library
- Jessica Chen. 2002. Formal modelling of java GUI event handling. In Proceedings of the 4th International Conference on Formal Engineering Methods: Formal Methods and Software Engineering (ICFEM’02). Springer-Verlag, London, UK, 359--370. Google Scholar
Digital Library
- Xiang Chen, Yiran Chen, Mian Dong, and Charlie Zhang. 2014. Demystifying energy usage in smartphones. In Proceedings of the 51st Annual Design Automation Conference (DAC’14). ACM, New York, NY, Article 70, 5 pages. DOI:http://dx.doi.org/10.1145/2593069.2596676 Google Scholar
Digital Library
- Gianpaolo Cugola, Alessandro Margara, Mauro Pezzè, and Matteo Pradella. 2015. Efficient analysis of event processing applications. In Proceedings of the 9th ACM International Conference on Distributed Event-Based Systems (DEBS’15). ACM, New York, NY, 10--21. DOI:http://dx.doi.org/10.1145/2675743.2771834 Google Scholar
Digital Library
- Ankush Desai, Vivek Gupta, Ethan Jackson, Shaz Qadeer, Sriram Rajamani, and Damien Zufferey. 2013. P: Safe asynchronous event-driven programming. SIGPLAN Not. 48, 6 (June 2013), 321--332. DOI:http://dx.doi.org/10.1145/2499370.2462184 Google Scholar
Digital Library
- Carlos Rafael Gimenes das Neves, Eduardo Martins Guerra, and Clovis Torres Fernandes. 2011. Language support for asynchronous event handling in the invocation call stack. In Proceedings of the 10th SIGPLAN Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward! 2011). ACM, New York, NY, 177--180. DOI:http://dx.doi.org/10.1145/2089131.2089141 Google Scholar
Digital Library
- Andres Gomez, Christian Pinto, Andrea Bartolini, Davide Rossi, Luca Benini, Hamed Fatemi, and Jose Pineda de Gyvez. 2015. Reducing energy consumption in microcontroller-based platforms with low design margin co-processors. In Proceedings of the 2015 Design, Automation 8 Test in Europe Conference 8 Exhibition (DATE’15). EDA Consortium, San Jose, CA, 269--272. Google Scholar
Digital Library
- Sangjin Han, Scott Marshall, Byung-Gon Chun, and Sylvia Ratnasamy. 2012. MegaPipe: A new programming interface for scalable network I/O. In Presented as Part of the 10th USENIX Symposium on Operating Systems Design and Implementation (OSDI 12). USENIX, Hollywood, CA, 135--148. Google Scholar
Digital Library
- Bill Holtsnider and Brian D. Jaffe. 2012. IT Manager’s Handbook, Third Edition: Getting Your New Job Done (3rd ed.). Morgan Kaufmann Publishers Inc., San Francisco, CA. Google Scholar
Digital Library
- Sandy Irani, Sandeep Shukla, and Rajesh Gupta. 2003. Online strategies for dynamic power management in systems with multiple power-saving states. ACM Trans. Embed. Comput. Syst. 2, 3 (Aug. 2003), 325--346. DOI:http://dx.doi.org/10.1145/860176.860180 Google Scholar
Digital Library
- Abhilash Jindal, Abhinav Pathak, Y. Charlie Hu, and Samuel Midkiff. 2013. Hypnos: Understanding and treating sleep conflicts in smartphones. In Proceedings of the 8th ACM European Conference on Computer Systems (EuroSys’13). ACM, New York, NY, 253--266. DOI:http://dx.doi.org/10.1145/2465351.2465377 Google Scholar
Digital Library
- Michael Kerrisk. 2015. POSIX Signals Manual (3.82 ed.). Linux Documentation Project.Google Scholar
- Umair Ali Khan and Bernhard Rinner. 2014. Online learning of timeout policies for dynamic power management. ACM Trans. Embed. Comput. Syst. 13, 4, Article 96 (Mar. 2014), 25 pages. DOI:http://dx.doi.org/ 10.1145/2529992 Google Scholar
Digital Library
- MinSeong Kim and Andy Wellings. 2007. Asynchronous event handling in the real-time specification for java. In Proceedings of the 5th International Workshop on Java Technologies for Real-time and Embedded Systems (JTRES’07). ACM, New York, NY, 3--12. DOI:http://dx.doi.org/10.1145/1288940.1288942 Google Scholar
Digital Library
- Minseong Kim and Andy Wellings. 2010. Efficient asynchronous event handling in the real-time specification for java. ACM Trans. Embed. Comput. Syst. 10, 1, Article 5 (Aug. 2010), 34 pages. DOI:http://dx.doi.org/10.1145/1814539.1814544 Google Scholar
Digital Library
- Greg Kroah-Hartman. 2007. Everything you Never Wanted to know about Kobjects, Ksets, and Ktypes.Google Scholar
- Jonathan Lemon. 2013. KQUEUE. FreeBSD System Calls Manual. Retrieved from www.freebsd.org/cgi/man.cgi?query=kqueue8sektion=2.Google Scholar
- Thomas L. Martin, Daniel P. Siewiorek, Asim Smailagic, Matthew Bosworth, Matthew Ettus, and Jolin Warren. 2003. A case study of a system-level approach to power-aware computing. ACM Trans. Embed. Comput. Syst. 2, 3 (Aug. 2003), 255--276. DOI:http://dx.doi.org/10.1145/860176.860178 Google Scholar
Digital Library
- NVIDIA. 2015. Retrieved from http://www.nvidia.com/object/jetson-tk1-embedded-dev-kit.html.Google Scholar
- Gustav Öquist and Kristin Lundin. 2007. Eye movement study of reading text on a mobile phone using paging, scrolling, leading, and RSVP. In Proceedings of the 6th International Conference on Mobile and Ubiquitous Multimedia (MUM’07). ACM, New York, NY, 176--183. DOI:http://dx.doi.org/ 10.1145/1329469.1329493 Google Scholar
Digital Library
- Chandandeep Singh Pabla. 2009. Completely fair scheduler. Linux J. 184 (Aug. 2009), 82--83. Google Scholar
Digital Library
- HeeMan Park, YoungLok Lee, BongNam Noh, and HyungHyo Lee. 2008. Design of an event system adopting ontology-based event model for ubiquitous environment. In Proceedings of the 5th International Conference on Soft Computing As Transdisciplinary Science and Technology (CSTST’08). ACM, New York, NY, 620--626. DOI:http://dx.doi.org/10.1145/1456223.1456350 Google Scholar
Digital Library
- Rance Rodrigues, Israel Koren, and Sandip Kundu. 2014. Performance and power benefits of sharing execution units between a high performance core and a low power core. In Proceedings of the 2014 27th International Conference on VLSI Design and 2014 13th International Conference on Embedded Systems (VLSID’14). IEEE Computer Society, Washington, DC, 204--209. DOI:http://dx.doi.org/10.1109/VLSID.2014.42 Google Scholar
Digital Library
- Frederic Rossi. 2003. An event mechanism for linux. Linux J. 2003, 111 (July 2003), 7. Google Scholar
Digital Library
- K. Salah, A. Manea, S. Zeadally, and Jose M. Alcaraz Calero. 2011. On linux starvation of cpu-bound processes in the presence of network I/O. Comput. Electr. Eng. 37, 6 (Nov. 2011), 1090--1105. DOI:http://dx.doi.org/10.1016/j.compeleceng.2011.07.001 Google Scholar
Digital Library
- Anahita Shayesteh, Glenn Reinman, Norm Jouppi, Tim Sherwood, and Suleyman Sair. 2006. Improving the performance and power efficiency of shared helpers in CMPs. In Proceedings of the 2006 International Conference on Compilers, Architecture and Synthesis for Embedded Systems (CASES’06). ACM, New York, NY, 345--356. DOI:http://dx.doi.org/10.1145/1176760.1176802 Google Scholar
Digital Library
- Hung-Cheng Shih and Kuochen Wang. 2012. An adaptive hybrid dynamic power management algorithm for mobile devices. Comput. Netw. 56, 2 (Feb. 2012), 548--565. DOI:http://dx.doi.org/10.1016/j.comnet.2011.10.005 Google Scholar
Digital Library
- Arneet Singh. 2014. Google introduces ART(Android Runtime) in KitKat. (2014). Retrieved from https://source.android.com/devices/tech/dalvik/index.html on 6 Aug 2015.Google Scholar
- Bruce Stewart. 2011. Is your android app getting enough sleep? O’Reilly (August 2011). Retrieved from http://radar.oreilly.com/2011/08/android-app-power-use.html on 6 Aug 2015.Google Scholar
- Ronald Strebelow and Christian Prehofer. 2012. Analysis of event processing design patterns and their performance dependency on I/O notification mechanisms. In Proceedings of the 2012 International Conference on Multicore Software Engineering, Performance, and Tools (MSEPT’12). Springer-Verlag, Berlin, 54--65. DOI:http://dx.doi.org/10.1007/978-3-642-31202-1_6 Google Scholar
Digital Library
- Panagiotis Vekris, Ranjit Jhala, Sorin Lerner, and Yuvraj Agarwal. 2012. Towards verifying android apps for the absence of no-sleep energy bugs. In Proceedings of the 2012 USENIX Conference on Power-Aware Computing and Systems (HotPower’12). USENIX Association, Berkeley, CA, 3--3. http://dl.acm.org/citation.cfm?id=2387869.2387872 Google Scholar
Digital Library
- Chengke Wang, Fengrun Yan, Yao Guo, and Xiangqun Chen. 2013. Power estimation for mobile applications with profile-driven battery traces. In Proceedings of the 2013 International Symposium on Low Power Electronics and Design (ISLPED’13). IEEE Press, Piscataway, NJ, 120--125. http://dl.acm.org/citation.cfm?id=2648668.2648697 Google Scholar
Digital Library
- Chee Siang Wong, Ian Tan, Rosalind Deena Kumari, and Fun Wey. 2008. Towards achieving fairness in the linux scheduler. SIGOPS Oper. Syst. Rev. 42, 5 (Jul. 2008), 34--43. DOI:http://dx.doi.org/ 10.1145/1400097.1400102 Google Scholar
Digital Library
- Chanmin Yoon, Dongwon Kim, Wonwoo Jung, Chulkoo Kang, and Hojung Cha. 2012. AppScope: Application energy metering framework for android smartphone using kernel activity monitoring. In Presented as part of the 2012 USENIX Annual Technical Conference (USENIX ATC 12). USENIX, Boston, MA, 387--400. https://www.usenix.org/conference/atc12/technical-sessions/presentation/yoon. Google Scholar
Digital Library
- Qingbo Zhan, Wenrui Zhao, Yi shao, Jianjun Zhuang, and Ying Chen. 2011. A novel multi-task software architecture applied in the intelligent insulin injector - an improved polling loop. In Proceedings of the 2011 1st International Workshop on Complexity and Data Mining (IWCDM’11). IEEE Computer Society, Washington, DC, 5--9. DOI:http://dx.doi.org/10.1109/IWCDM.2011.49 Google Scholar
Digital Library
Index Terms
Reducing Power Consumption and Latency in Mobile Devices Using an Event Stream Model
Recommendations
TouchDevelop: create rich mobile apps on touch devices (tutorial)
MOBILESoft 2014: Proceedings of the 1st International Conference on Mobile Software Engineering and SystemsWe are experiencing a technology shift: Powerful and easy-to-use mobile devices like smartphones and tablets are becoming more prevalent than traditional PCs and laptops. Mobile devices are going to be the first and, in less developed countries, ...
Power-aware video decoding using real-time event handlers
WOWMOM '02: Proceedings of the 5th ACM international workshop on Wireless mobile multimediaMultimedia applications have to receive sufficient resource allocations to maintain their desired levels of Quality of Service (QoS). On the other hand, in mobile environments, the devices on which these applications must run have to minimize power ...
Event driven time synchronization of mobile devices
UbiComp '14 Adjunct: Proceedings of the 2014 ACM International Joint Conference on Pervasive and Ubiquitous Computing: Adjunct PublicationMobile devices are increasingly used for context recognition. Recognition accuracies partly depend on the time synchronicity between the mobile devices used for data recording and labeling. Mobile device synchronization can be done via the Internet or ...






Comments