Runtime energy management of multi-core processors