5.82 Process and Thread Priorities

This section covers details regarding the priority settings within Hercules. The relevant system parame-
ters are:

CPUPRIO DEVPRIO HERCPRIO SRVPRIO TODPRIO

5.82.1 Process Priorities

Under Linux a process is a thread and thread priority information applies instead.

For Windows the following conversions are used for translating Unix process priorities to Windows priority
classes:

Unix
Process Priority

Windows
Priority Class

Meaning

-20 to -16

Realtime

Process that has the highest possible priority. The threads of
the process preempt the threads of all other processes, inclu-
ding operating system processes performing important tasks.
For example, a real-time process that executes for more than a
very brief interval can cause disk caches not to flush or cause
the mouse to be unresponsive.

-15 to -9

High

Process that performs time-critical tasks that must be executed
immediately. The threads of the process preempt the threads of
normal or idle priority class processes. An example is the Task
List, which must respond quickly when called by the user, re-
gardless of the load on the operating system. Use extreme care
when using the high-priority class, because a high-priority class
application can use nearly all available CPU time.

-8 to -1

Above Normal

Process that has priority above the Normal class but below the
High class.

0 to 7

Normal

Process with no special scheduling needs.

8 to 15

Below Normal

Process that has priority above the Idle class but below the
Normal class.

16 to 20

Low

Process whose threads run only when the system is idle. The
threads of the process are preempted by the threads of any
process running in a higher priority class. An example is a
screen saver. The idle-priority class is inherited by child pro-
cesses.

Table 8: Process Priority Conversions

Caution: On Windows, the value you choose for your process priority has a direct impact on how your
thread priorities are interpreted! You should never modify one without understanding what impact you are
doing so might have on the other!

5.82.2 Thread Priorities

On Linux/Unix hosts Hercules needs to be a setuid root program to allow it to reset its dispatching priority
to a high (negative) value (i.e. “chown root.root hercules; chmod +s hercules”).

For Windows the following conversions are used for translating Linux/Unix thread priorities to Windows
thread priorities:

Unix
Thread Priority

Windows
Thread Priority

Meaning

-20 to -16

Time Critical

Base priority of 15 for Idle, Below Normal, Normal, Above Normal,
or High class processes, and a base priority of 31 for Realtime
class processes.

-15 to -9

Highest

Priority 2 points above the priority class.

-8 to -1

Above Normal

Priority 1 point above the priority class.

0 to 7

Normal

Normal priority for the priority class.

8 to 15

Below Normal

Priority 1 point below the priority class.

16 to 19

Lowest

Priority 2 points below the priority class.

20

Idle

Base priority of 1 for Idle, Below Normal, Normal, Above Normal,
or High class processes, and a base priority of 16 for Realtime
class processes.

Table 9: Thread Priority Conversions

Caution: On Windows, your Thread Priority is interpreted differently based on your chosen Process Prio-
rity setting! You should never modify your Thread Priority settings without first reviewing your chosen Pro-
cess Priority setting!

Previous Page Next Page