Real-time and energy efficiency in Linux: theory and practice