Options for process and thread priorities

NOTE: Since Scultptor version 6.0.3

These are equivalent to the priority classes in the Windows API but are not the values used in that API.

The possible thread priorities are:

THREAD_PRIORITY_IDLE (1)
THREAD_PRIORITY_LOW (2)
THREAD_PRIORITY_BELOW_NORMAL (3)
THREAD_PRIORITY_NORMAL (4)
THREAD_PRIORITY_ABOVE_NORMAL (5)
THREAD_PRIORITY_HIGH (6)
THREAD_PRIORITY_TIME_CRITICAL (7)

The thread priorities are relative to other threads in the same process. The overall priority of a process is defined by the PROCESS_PRIORITY values used with the get_process_priority() and set_process_priority() functions.

The possible process priorities are:

PROCESS_PRIORITY_IDLE (1)
PROCESS_PRIORITY_BELOW_NORMAL (2)
PROCESS_PRIORITY_NORMAL (3)
PROCESS_PRIORITY_ABOVE_NORMAL (4)
PROCESS_PRIORITY_HIGH (5)
PROCESS_PRIORITY_REALTIME (6)

On Unix and Linux, the default process “nice” value of 0 is deemed to be PROCESS_PRIORITY_NORMAL and THREAD_PRIORITY_NORMAL. This is an approximate equivalent to the behaviour of the Windows API. To map a “nice” value to a priority class and thread priority when these values have not been previously set, Sculptor chooses a sensible fit. Some platforms bias the “nice” value so that it is always positive. In these cases, Sculptor makes the necessary adjustments automatically.

I

THREAD_PRIORITY_IDLE

L

THREAD_PRIORITY_LOW

BN

THREAD_PRIORITY_BELOW_NORMAL

N

THREAD_PRIORITY_NORMAL

AN

THREAD_PRIORITY_ABOVE_NORMAL

H

THREAD_PRIORITY_HIGH

TC

THREAD_PRIORITY_TIME_CRITICAL

THREAD PRIORITY

I

L

BN

N

AN

H

TC

PROCESS_PRIORITY_IDLE

19

14

12

10

9

8

-13

PROCESS_PRIORITY_BELOW_NORMAL

18

7

6

5

4

3

-13

PROCESS_PRIORITY_NORMAL

17

2

1

0

-1

-2

-13

PROCESS_PRIORITY_ABOVE_NORMAL

16

-3

-4

-5

-6

-7

-13

PROCESS_PRIORITY_HIGH

15

-8

-9

-10

-11

-12

-13

PROCESS_PRIORITY_REALTIME

-14

-15

-16

-17

-18

-19

-20


RELATED TOPICS

get_process_priority()

set_process_priority()

get_thread_priority()

set_thread_priority()

The include file sculptor.h