MentOS
0.8.0
The Mentoring Operating System
|
Defines processes priority value. More...
Go to the source code of this file.
Macros | |
#define | MAX_NICE +19 |
Max niceness value. | |
#define | MIN_NICE -20 |
Min niceness value. | |
#define | NICE_WIDTH (MAX_NICE - MIN_NICE + 1) |
Niceness range. | |
#define | MAX_RT_PRIO 100 |
Maximum real-time priority. | |
#define | MAX_PRIO (MAX_RT_PRIO + NICE_WIDTH) |
Maximum priority. | |
#define | DEFAULT_PRIO (MAX_RT_PRIO + NICE_WIDTH / 2) |
Default priority. | |
#define | NICE_TO_PRIO(nice) ((nice) + DEFAULT_PRIO) |
Converts user-nice values [ -20 ... 0 ... 19 ] to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ]. | |
#define | PRIO_TO_NICE(prio) ((prio)-DEFAULT_PRIO) |
Converts static priority [ MAX_RT_PRIO..MAX_PRIO-1 ] to user-nice values [ -20 ... 0 ... 19 ]. | |
#define | USER_PRIO(p) ((p)-MAX_RT_PRIO) |
'User priority' is the nice value converted to something we can work with better when scaling various scheduler parameters, it's a [ 0 ... 39 ] range. | |
#define | TASK_USER_PRIO(p) USER_PRIO((p)->static_prio) |
Provide easy access to the priority value of a task_struct. | |
#define | MAX_USER_PRIO (USER_PRIO(MAX_PRIO)) |
The maximum priority for a user process. | |
#define | GET_WEIGHT(prio) prio_to_weight[USER_PRIO((prio))] |
Transforms the priority to weight. | |
#define | NICE_0_LOAD GET_WEIGHT(DEFAULT_PRIO) |
Weight of a default priority. | |
Variables | |
static const int | prio_to_weight [NICE_WIDTH] |
Table that transforms the priority into a weight, used for computing the virtual runtime. More... | |
Defines processes priority value.
|
static |
Table that transforms the priority into a weight, used for computing the virtual runtime.