However, the new setting might mean that some programs become more jerky or games begin to stutter. If it doesn't work for you, then there's a Registry setting you can tweak: 'HKEY_LOCAL_MACHINE\ SYSTEM\CurrentControlSet\ Control\PriorityControl\Win32 PrioritySeparation'. Setting it to '16 (Hex)' delivers a long quantum with a high foreground boost to combat jerkiness. See the table on the next page for more options.
Process priority
Quantums are interesting, but the real key to thread scheduling lies in its priority. When a program is launched, its process is assigned one of six priorities: Realtime, High, Above Normal, Normal, Below Normal or Idle. Each thread for the process then inherits this priority, which is used to determine which one runs next. A High priority thread will usually be preferred to one with Normal priority, for instance.
Won't this mean some threads run all the time? Not quite. Most threads only have a limited task to perform – like 'spell check this document' – and at some point they'll be finished. And if a thread accesses hardware, perhaps opening a file, then it may enter a wait state until the device returns some information. Windows notices this and schedules another thread to run in the meantime.
In addition, a Windows component called the Balance Set Manager runs every second, looking for threads that haven't had any recent CPU attention and giving them a temporary priority and quantum boost. You'll probably have seen this at work yourself, when a process seems to grab 100 per cent of your CPU time, yet other programs still respond – though very, very slowly. That's the Balance Set Manager kicking in.
It can be useful to tweak process priorities for yourself. If a rogue process starts grabbing 100 per cent of CPU time, press [CTRL]+[Shift] +[ESC] to launch Task Manager. Select the Processes tab and click the CPU column header (click 'View | Select Columns' and check 'CPU' if you don't see it) to sort by CPU use, so you can easily spot the resource hog. Then right-click that process and choose 'Set Priority | Below Normal'. This should allow other threads to be scheduled again, letting you regain control of your PC.
You can also use 'start.exe' to launch processes with the priority of your choice. To do so, right-click your program shortcut and modify the Target to something like: cmd.exe /c START /low c:\path\app.exe.
Get daily insight, inspiration and deals in your inbox
Sign up for breaking news, reviews, opinion, top tech deals, and more.
Use '/low' for a process that you don't want to grab CPU time, or '/ high' when speed is vital. Boosting a thread's priority to High can give you a five or 10 per cent performance gain, but use this technique sparingly: remember, you're borrowing these CPU cycles from other processes and these will be slowing down. Many Windows processes also work at higher priorities and if they're blocked because you're running a game, say, your system could crash. Our advice: run only one priority-boosted app at a time and experiment with the new setting for a while before you assume that it's stable.
CPU affinity
Running a process at a low priority can be taken too far in cases where processor attention is limited so much that the program gets almost no work done.
However, there is another way to free up your CPU's time. Virtually all modern PCs now come with either a dual- or quadcore CPU. These provide two or four physical processors, each of which can be running a thread at any given time. There's no special rule for sharing out these extra CPUs, though: Windows looks at quantums and priorities just as normal, and there's nothing to stop a multithreaded application tying up your processors all on its own.