How To Assign Priority To Fullscreen Games/emulators?


Esn

(:";
Joined
Mar 5, 2003
Messages
3,239
Location
Toronto, Canada
Website
esn.newgrounds.com
I notice that a lot of the time, when I use software on the Pandora, the framerate is not consistent but is interrupted every so often by what seem like background processes. Now, I know one way to solve this is to run them from Minimenu after running the Background killer PND. However, that's a bit inconvenient since I have to restart after that if I want to do anything like internet browsing after I'm done with the game. I wonder if there's a way to simply change the priorities of the different processes, so that the game/emulator will always be top priority and not be slowed down by other processes, which will still nevertheless be running. Like how you can set priorities in Windows, for example...

I guess another solution might be to have a "background killer" that can be undone without a reset...

I don't know much about how the Pandora's background processes work, so perhaps someone can help me understand what's going on.
 
The commands 'nice' and 'renice' are used to set priorities on *nix systems (nice is used to set priority when starting a program, renice to change it while the program is running). Everything has a priority number between -19 and 20 (-19 being highest priority, 20 being lowest. Yes that's confusing.).

But PNDs are already launched with the highest priority that a user can set (which is 0). Negative priorities can only be set by the root (administrator) account.

You could probably edit pnd_run.sh to set PNDs to the highest possible priority, but it'd have to ask you for your password.

Also, you could try replacing the CPU scheduler. The one that Linux uses by default (called the Completely Fair Scheduler) is really designed to maximize performance on computing clusters with many CPUs, and not for desktop usage. It will sometimes favor system processes over interactive performance, which is exactly the problem you're describing. There's an alternative scheduler called BFS (Brain Fuck Scheduler) which is intended to increase interactivity on computers with <16 CPUs (which the Pandora obviously falls under). It's used in some custom Android ROMs and a few desktop Linux distros, and supposedly makes a difference there. I don't know if it would provide any noticeable change on the Pandora or not.

But to use BFS, you'll have to recompile the kernel with the BFS patches (it's never going to get accepted into the mainline kernel for political reasons, so you have to grab it seperately). And I don't know whether or not it'll work with the ancient kernel the Pandora currently ships with (it probably will though, I doubt that the CPU scheduler actually changes very much between releases).
 
Back
Top