Linux also has a static priority & a dynamic one. Both SCHED_RR &
SCHED_FIFO has the static priority in the range of 1 to 99. Since only
root is allowed static priority above 0, only root can create these
class of processes.
If at any time a process of higher static priority gets ready to run,
the running process is pre empted in order to run the higher priority
The dynamic priority is used only to choose the process from the list
of ready-to-run-processes belonging to the same static priority.
A processes dynamic priority goes up whenever it is ready to run but
scheduler picker up another process ( of teh same class ). As a result
when a process sits in the queue for a while ready to run, it s
dynamic priority will increase.
The nice(1) uses system call setpriority() to change the dynamic
priority base point of a process.
So if you make a process -15, it will only wait smaller period of time
compared to a -1, before the scheduler picks it up for running. ( In
the first case other processes will have to wait longer before their
dynamic priorities go above -15, whereas in the second case they only
have to wait a shorter period before their dynamic priorities go above