Computing Priorities

Recall that it is not sufficient to consider just the static priority of a process, but that three priorities must be taken into account: dynamic priority (task_struct->prio), normal priority (task_struct->normal_prio), and static priority (task_struct->static_prio). These priorities are related to each other in interesting ways, and in the following I discuss how.

static_prio is the starting point of the calculations. Assume that it has been already set and that the kernel now wants to compute the other priorities. This is done by a one-liner:

The auxiliary function effective_prio performs the following operations:

Continue reading here: Computing Load Weights

Was this article helpful?

0 0