Creating Energy-Efficient Software (Part 4)

Operating Systems

This brief section provides some links to references that describe operating system features that support development of power-aware applications – for Microsoft Windows Vista and for Linux.

For creating power-aware applications in Vista, Microsoft has some extensive resources on this topic that can be found at [Ref10,Ref11,Ref12,and Ref13]. For example, in the whitepaper Application Power Management Best Practices for Windows Vista [Ref11], the authors emphasize the following topics:

  • Handling Sleep and Resume Transitions
  • Preventing System Idle Timeouts
  • Designing for Extended Battery Life
  • Responding to Common Power Events
  • Designing for Entertainment and Media PC Scenarios
  • Using Power Management APIs from Managed Code
  • Designing for Earlier Versions of Windows
  • Responding to Power Events within a Windows Service
  • Testing Applications for Power Management

Microsoft also provides information on the Advanced Configuration and Power Interface (ACPI) which defines common interfaces for hardware recognition, motherboard and device configuration, and power management. Writing drivers that are ACPI-compatible allows the OS to control the device power states, power down the device when not in use, and therefore save energy. For more information, see [Ref12]. Most Linux distributions also support ACPI.

For creating power-aware applications for Linux there are a number of groups that can be found simply by searching for “Linux Power Management” via your favored search engine. For examp le, see [Ref19] for a Linux Power Management Guide or [Ref20] for an article on Power Management in Linux-based systems.

Another consideration for Linux developers is to use an energy-efficient Linux distribution intended for mobile devices such as Midori, an Open Source project for delivering system software on small devices. [Ref21]

An interesting Linux-based tool to check for process energy-efficiency is Linux PowerTOP.[11] PowerTOP identifies processes that, by virtue of tight time interrupts, prevent the CPU from entering deeper C-states. has been successful in identifying and improving portions of the Linux OS that have led to energy-efficient improvements in the various distributions.

Tools and Technologies

This section describes a set of tools from Intel that support multi-threading and context-aware computing.

Threading Tools

Intel® Thread Checker

Intel Thread Checker is an analysis tool that pinpoints hard-to-find threading errors such as race conditions and deadlocks in 32-bit and 64-bit applications. It can also be integrated into an automated Quality Assurance/test process to ensure code quality. The tool:

  • Detects hidden potential errors such as deadlocks and race conditions, mapping them to the source-code line, call stack, and memory reference
  • Displays useful warnings for effective threaded application diagnosis, highlighting the most potentially severe errors
  • When used with supported Intel® compilers and source instrumentation mode, tracks the error down to the specific variable in your source code
  • With comprehensive error detection, mitigates the risk of adding threads and enables hands-on learning about the fundamental principles of threading

Intel® Thread Profiler

Intel Thread Profiler 3.1 for Windows* helps you tune multi-threaded applications faster, for optimal performance on Intel® multi-core processors. The tool helps the developer:

  • Understand what threads are doing and how they interact (timeline view)
  • Pinpoint the exact location of performance issues in call stacks and source code to aid analysis
  • Measure the number of cores that are effectively utilized by the application to determine actual parallel performance

Intel® Thread Building Blocks

Intel Threading Building Blocks 1.1 is a C++ runtime library that abstracts the low-level threading details necessary for optimal multi-core performance. It uses common C++ templates and coding style to eliminate tedious threading implementation work. It allows the developer to create applications that are portable across platforms and inherently scalable, i.e. no code maintenance is required as more processor cores become available.

  • Includes commonly needed algorithms designed for parallel performance and scalability
  • Provides generic templates to tailor the algorithms to the developer’s needs
  • Supports easy plug-in deployment into applications to deliver scalable software speed-up, optimizing for both available cores and cache locality
  • Reduces the work required to produce threaded software in many cases, by means of pre-built parallel constructs

Intel® VTune™ Performance Analyzer

Intel VTune™ Performance Analyzer simplifies application performance tuning with a graphical user interface and no recompiles required. It is compiler and language independent and works with C, C++, Fortran, C#, Java, .NET and others. VTune includes call graph analysis, sampling events, plus an extensive set of tuning events for all the latest Intel® processors. There is version of VTune for Windows and another for Linux.

Context Awareness Tools

Intel has created several tools for developers that provide features that enable them to develop context-aware applications. These include:

  • Mobile Platform Software Developer Kit (MPSDK)
  • Laptop Gaming Technology Developer Kit (Gaming TDK)
  • Web 2.0 Technology Development Kit (Web 2.0 TDK)

Intel® Mobile Platform SDK

Mobile users expect business applications to adjust automatically to resource-constrained mobile environments. With the Intel Mobile Platform SDK, developers can integrate mobile features that meet user expectations for computing anytime and anywhere:

  • Manage connectivity transparently: Develop applications that let users focus on their tasks rather than managing network connections
  • Balance power and performance: Developers can use the power context to get the most from the available battery life
  • Manage available memory: Use available memory and disk space for local data store and synchronization. Applications developed with the SDK can discover and utilize available memory and disk storage for caching, local data store, and synchronization.
  • Adapt to different display types: Mobile devices are often connected to different display types. Applications based on the SDK can discover the attached display type and adapt to it.

Creating code that is aware of platform context means that applications can more efficiently adapt to user settings as well as environmental and platform changes.

The following figure shows how the Intel Mobile Platform SDK straddles several different functional layers to provide better integration between applications and mobile hardware.

For more information on the Intel Mobile Platform SDK - Intel Mobile Software Development Forum

Intel® Laptop Gaming TDK

The Intel® Laptop Gaming Technology Development Kit (TDK) provides an interface to help extend games by adding mobile-aware features to deliver a better laptop gaming experience.

The TDK includes C++ code that help developers create applications that:

  • Respond to platform state changes such as power source changes, battery power levels, and WiFi signal strength variations
  • Improve game play by monitoring platform characteristics and taking appropriate action in response to changes due to mobile usage
  • Provide for better processor utilization in multi-core platforms using threaded API calls

Key features include:

  • A top-level API to get information about battery power states, network connectivity, and processor information, including number of cores
  • A threaded event management system to monitor system changes with minimal overhead to client game applications.
  • Allows creation of user-defined callbacks in an object-oriented way to handle specific platform events

For more information on the Laptop Gaming TDK, visit: /en-us/articles/intel-laptop-gaming-technology-development-kit

Intel® Web 2.0 TDK

The Web 2.0 TDK provides royalty-free Javascript API, binary, and source code to that enable developers to create web applications that taking advantage of the mobile features on notebooks and UMPCs. In Web 2.0 applications, developers can leverage information about the platform's configuration and context to provide more expressive interactions and better user experience, especially on mobile platforms where intermittent connectivity and limited power are common issues.

The TDK allows developers to learn about the platform's configuration, e.g. display, storage, processor, and the platform's context, e.g. bandwidth, connectivity, power and location, etc. within a browser using JavaScript. It contains documentation and full source code (C++ and JavaScript) for IE 6/7 and Firefox. The code can be incorporated directly in extensions or JavaScript libraries, and be redistributed royalty free.

Key features include:

  • Support for Windows XP* with an IE6/7 or Firefox browser
  • Creation of user-defined callbacks in an object-oriented way to handle specific platform events
  • A high-level JavaScript API to get information about battery power states, network connectivity, and processor information, including number of cores.
  • Information APIs for Power, Connectivity, Storage, Bandwidth, Processor, and Location

More information and demos/videos can be found at: Web 2.0 TDK


This paper examined software methodologies, designs, and software development tools that can be used to improve the energy efficiency of application software and extend mobile platform battery time. Computational efficiency, data efficiency, and context-aware methods can all contribute to creating applications that are power-aware. There are many resources available in the form of white-papers, developer kits, and analysis tools. See the list of References for more information

This paper examined software methodologies, designs, and software development tools that can be used to improve the energy efficiency of application software and extend mobile platform battery time. Computational efficiency, data efficiency, and context-aware methods can all contribute to creating applications that are power-aware. Intel provides many resources to achieve these goals in the form of white-pap ers, developer kits, and analysis tools. Many of the resources are referenced above and in the next section. More information on energy-efficiency and other topics can be found at /en-us/articles/energy-efficient-software.


  1. Power Analysis of Embedded Software, Tiwari, Malik, and Wolfe, International Conference on Computer Aided Design, 1994.
  2. Data-Efficient Software and Memory Architectures are Essential for Higher Performance and Lower Power, Dr. Guido Arnout, Information Quarterly, V.4, No.3, 2005
  3. Power Analysis of Disk I/O Methodologies, Karthik Krishnan and June De Vega, Power Analysis of Disk I/O Methodologies
  4. Power Optimization: Furthering the Mobile Vision, Karthik Krishnan, Rajshree Chabukswar, and Jun De Vega, /en-us/articles/power-optimization-furthering-the-mobile-vision
  5. Maximizing Performance and Energy-Efficiency on Intel® Core™ Microarchitecture using Multi-Threading, Rajshree Chabukswar.
  6. Maximizing Power Savings on Mobile Platforms, Rajshree Chabukswar, /en-us/articles/maximizing-power-savings-on-mobile-platforms
  7. Selected Papers on the Analysis of Algorithms, Donald E. Knuth, 2000
  8. Art of Computer Programming, 4 Volumes, Donald E. Knuth, 2005
  9. An Introduction to the Analysis of Algorithms, Robert Sedgewick and Philippe Flajolet, 1996
  10. Windows Vista: Developing Power-Aware Applications, slide presentation, Pat Stemen and Geralyn Miller, SDC 2005 (see: )
  11. Application Power Management Best Practices for Windows Vista, Microsoft whitepaper, (see: )
  12. ACPI / Power Management - Architecture and Driver Support, Microsoft Hardware Developer Central,(see: )
  13. Processor Power Management in Windows Vista and Windows Server 2008, Microsoft whitepaper,(see: )
  14. Extending the World’s Most Popular Processor Architecture, R.M. Ramanathan, Intel whitepaper, (see: )
  15. PeekMessage: Optimizing Applications for Extended Battery Life, Dale Taylor, Intel whitepaper
  16. Energy-Efficient Graphical User Interface Design, Vallerio, Zhong, Jha
  17. Data Transfer over Wireless LAN Power Consumption Analysis, Jun De Vega and Rajshree Chabukswar, Intel whitepaper, /en-us/articles/data-transfer-over-wireless-lan-power-consumption-analysis
  18. B. Schilit, N. Adams, and R. Want. (1994). "Context-aware computing applications". IEEE Workshop on Mobile Computing Systems and Applications (WMCSA'94), Santa Cruz, CA, US: 89-101.  (see: )
  19. Linux Power Management Guide,
  20. Power Management in Linux-based Systems,
  21. Midori Linux SourceForge Home Page,


About the Authors

Bob Steigerwald
Bob Steigerwald is an engineering manager in Intel’s Software Solutions Group at Intel in Folsom, California. He received his B.S. degree in Computer Science from the US Air Force Academy, Masters in CS from the University of Illinois, and Ph.D. in CS from the Naval Postgraduate School where his research was in Software Engineering and software reuse. Currently his team works on defining tools and technologies to support the development of energy-efficient software for Intel-based mobile platforms. His e-mail is

Rajshree Chabukswar
Rajshree Chabukswar is a software engineer working on client enabling in the Software Solutions Group that enables client platforms through software optimizations. Prior to working at Intel, she obtained a Masters degree in Computer Engineering from Syracuse University, NY. Her e-mail is

Karthik Krishnan
Karthik Krishnan is a software engineer with the Software Solutions Group at Intel. He holds a Masters degree in Mathematics from the Indian Institute of Technology. His current focus is on power and performance optimization of software applications on dual-core platforms. His e-mail is

Jun De Vega
Jun De Vega is an Application Engineer in Intel’s Software and Solutions Group, working on application tuning and optimization for Intel® architecture. He supports enabling of ISV applications on Intel® Mobile and Desktop Platforms. Contact him at

Appendix A - Power Measurement Methodology

Measuring power usage of individual components in a mobile platform is not a trivial task. Various tools exist to provide a high-level estimate of the power consumed by a particular mobile platform, but they do not provide the granular details on specific components. A more accurate but invasive way to measure power will be to use data acquisition (DAQ) tools where specific hardware components are instrumented and a more granular power measurement can be logged. The following lists the platform details we used for our analyses, along with the power-measurement methodology.


Fluke NetDAQ* 2686A

Target PC: Intel® Core™ Duo/2GHz Yonah, Jamison Canyon* CRB, 2x512MB DDR2, 40GB SATA 5400 rpm (2.5” mobile), CD/DVD drive, Microsoft Windows* XP Professional SP2

Host PC: Any IA32 system


Test Applications (different applications used)

NetDAQ Logger: Fluke DAQ Software v2.2

Test Setup

  • The Host PC can be any IA32 system with Microsoft Windows XP and the NetDAQ logger software. The logger collects the measured current and voltages and lets the user calculate the average power (W). The sampling interval we used for our entire analysis was 25 milliseconds. The platform power measurement does not include the LCD display of the mobile device.
  • The NetDAQ has modules that are attached (individual wires) to the Target PC and measures the current and voltage drop across the sense resistors. The NetDAQ is connected to the Host PC via a cross-over network cable.
  • The Target PC (Napa/Yonah) has a special motherboard (Jamison Canyon CRB) with built-in sensors. For each target component (i.e., the CPU), all sense resistors are wired (soldered) at both ends and connected to a module attached to the NetDAQ unit.

[1] It is interesting to note that this is not always true. Due to the quadratic relationship between processor states and voltage, it can be demonstrated that a process running for a longer time at a lower P-state may actually use less total energy than running the same process at a high P-state for less time. This is an area of future research.

[2] More detaile d coverage of this topic can be found at:

[3]NetDAQ* Networked Data Acquisition Unit

[4] GV3is a Microsoft hotfix (KB896256) to change the kernel power manager to track CPU utilization across the entire package instead of individual cores. It resolves an issue the power manager had with incorrectly calculate the optimal target performance state for the processor when one core was much less busy than the others. The  performance state was set too low and performance suffered in adaptive mode.

[5] More detail on this study can be obtained from: DVD Playback Power Consumption Analysis

[6] For details on MobileMark 2005, see:

[7] More details from this analysis are available at: Power Analysis of Disk I/O Methodologies

[8] More detailed coverage of this topic can be found at: Data Transfer over Wireless LAN Power Consumption Analysis

[9] For complete details of this study, please see: Enabling Games for Power

[10] For details on Extech Power Analyzers, see:

[11] See:


Prev1 2 3 4Next

Page 4 of 4
For more complete information about compiler optimizations, see our Optimization Notice.