dynamic frequency scaling algorithm for android/linux