CPU-core frequency scaling for efficient thread scheduling in transactional memories