Windows XP, Scheduler Set Priority...

SVT Cobra

Lifer
Mar 29, 2005
13,264
2
0
in the task manager right clicking on a process and changing its priority...does it really do anything?...I am thinking about running some tests on it to see if it really does effect the windows scheduler, or if it really does not do much, and how it might effect multitasking...

before i run the tests I want to get some more info...anyone else have anything to say about it? is this known about and do a lot of people use it ect?
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: Son of a N00b
in the task manager right clicking on a process and changing its priority...does it really do anything?...I am thinking about running some tests on it to see if it really does effect the windows scheduler, or if it really does not do much, and how it might effect multitasking...

before i run the tests I want to get some more info...anyone else have anything to say about it? is this known about and do a lot of people use it ect?

Yes it does something, it changes the process priority. Unless you understand the ramifications, and have a specific need to ensure one app gets more time slices than another, your not gonna see much difference twiddling with it.
 

SVT Cobra

Lifer
Mar 29, 2005
13,264
2
0
yes i do understand how windows assigns numeric symbols to each thread and then subtracts 3 from each thread every clock cycle until it reaches zero..ect ect ect... but there are is a lot of stuff in windows that does not do much ;)
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Process priority really does work. Setting processes to low priority, can make your multi-tasking experience much better, or much worse.

Basically, if a task wants as much CPU time as it can get, then it will block any lower priority tasks from getting any CPU time. If the CPU is partly idle then you won't notice any difference from changing priorities. However, if the CPU is maxed, then changing priorities can make big differences to responsiveness.

E.g. let's say you want to encode a long video into MPEG. A process that can take several hours.
If the encoder process runs at 'normal' priority, then it will compete for the CPU's time on a level playing field with everything else. Because the encoder wants all the CPU's time, no other program will be able to get more than 50% of the CPU (an equal share between it and the encoder) - this will cause noticable lag and slow response in other programs.
If you change the encoder priority to low, then where it has to compete for CPU, the other program will win. The other program will be granted 100% of the CPU's time until it completes it's operation. This will keep your system responsive, and running smoothly.

Note, that it won't slow down your encoding overall - the same amount of CPU time, in total, will be given to all programs.

The same thing works in reverse if you select high priority. If you have a program which has to remain responsive, even under heavy multitasking, then setting it to high priority will ensure that it will get the maximum amount of CPU time as quickly as possible.

'Real time' priority is even higher than 'high'. Setting anything to real-time is a bad idea - because this has higher priority than most Windows internal functions - like handling the mouse, keyboard, pagefile, disk caches, redrawing the screen, etc. If you do set a process to 'real time' and it wants all the CPU, your computer be unusable until it finishes.