For all of the following instructions, frequency is in hertz (Hz) or, the number of times per second that something happens. Intervals are in seconds, and refer to the amount of time between two things happening. Due to variations and limitations in different operating systems, times will be accurate to between several and a few dozen milliseconds depending on your system.
CPU Loader operates by creating a thread that loops continually, calculating the next position of the graph and drawing it. The user may specify how much of a priority Windows should give to running this thread. The user may also specify how frequently the feedback data should be updated, how frequently the thread should rest so the computer can allow other software to run, and how long each rest should last.
There is also an option to make these settings random, within user specified boundaries. When the "Randomize" box is checked, the rest duration and frequency will be reset at an interval specified in the "Randomize Frequency" field. The new rest frequency will be a random interval between the "Low Frequency" and the "High Frequency". Likewise, the rest duration will be random, but within the bounds of the "Low Duration" and "High Duration".
Priority is important in this utility because Windows divides up the processor time among all software running on the computer based on need, rather than on who's turn it is. If you run CPU Loader with a normal priority to see how a higher priority application performs with this competition, you will find very little difference. This is because Windows will give the higher priority application all of the CPU power it needs, forcing CPU Loader to wait until the other application is done.
The priority of any action that software performs in Windows is governed by two different priority settings. The "process priority" is the priority of a whole single program, and exists in and of itself. The "thread priority" is the priority given to a specific thread within the program, and exists relative to the process priority. So, for example, the "Highest Priority" thread of an "Idle Priority" program, is still not as high of priority as a "Normal Priority" thread from a "Normal Priority" program.
Most applications use the processor very little. It is rare that a program uses the CPU at more than 50% capacity for longer than a second or two. So, for realistic simulation, some rest time should be specified while running.
Also, the threads in Windows that control the user's ability to interact with the computer are about priority level 13. Any task running as a higher priority than this can lock the user out of the computer because the software that lets the user move the mouse and click the "Stop" button never gets a chance to run. NOTE: A safety feature is built in to prevent this from happening.
By default, CPU Loader will effectively slow your computer to half speed. It is set to run as a high priority process with a normal priority thread. This means that any time CPU Loader spends working will be taken away from most normal programs that may be running. The rest frequency is set to 26 times per second with a total of just over one-half second rest per second that the thread is running.
Thread priority in Windows ranges from 1 to 31. Higher numbers indicate higher priority. According to Microsoft:
However, in practice, there are a lot more factors to consider. For example, Windows 95, 98, and Me handle thread priority differently than Windows NT, 2000, and XP. And, certain rules about how CPU time is distributed can have effects that seem to override priority settings. One example of this is that Windows will never take the processor away from an active real time thread. So, two time critical real time threads will not receive equal CPU time unless they both take a break at even intervals.
Another rule that effects this program heavily, is that any thread that takes a break, i.e. goes to sleep, loses it's place in line for the CPU. Therefore, a thread that has to wait even a few CPU cycles for some shared resource to become free, will end up also waiting for another turn to do it's work. This is why you will see the spinners pause occasionally if you have several copies of this program running at once.