We show how to characterize the energy consumption of individual operating system (OS) functions in the µC/OS-II real time kernel running on an ARM7TDMI-based embedded system. We then derive a strategy for saving energy based on locking more energy-consuming kernel routines of µC/OS-II into the cache and reassigning cache locations to reduce cache contention between frequently invoked kernel functions. The proposed method saves about 37 percent of the energy otherwise consumed by the µC/OS-II kernel, leading to reductions of up to 5.9 percent in the total energy consumption, which includes the energy consumed by the application. © 2012 Alcatel-Lucent.