All about programming in GNU/LINUX

Posts tagged “Kernel scheduler

Process Priorities by the linux scheduler

In multitasking systems inspite of there will many processes in memory at a given point of time ,but only one at a time will be in runnable state . The scheduler decides the the processes sequence to be run .


There are two types of multitasking systems




In preemptive multitasking, the scheduler decides

when a process is to cease running and a new process is to begin running , the act of involuntarily suspending a running process is called preemption.


One of the common scheduling policy is priority based scheduling.More time-slice is provided for processes with higher priority .The priority of a process is indicated by its nice value.Nice value ranges from -20 to +19 .Priority is inversely proportional to its nice value.The nice values of processes can found under the column NI on issuing the command ps -el


Another value which decides the priority of a process is the real time priority value.It ranges from 0-99.The priority of a process is proportional to this value.The command ps -eo pid,rtprio lists the real time priority value of a process under the RTPRIO column.