Hi all today we will see whet is process priority and kernal sheduler in simple.
First we should know what is kernal sheduler.
Kernal sheduler - it is a unit of kernal which allocates cpu time for all runnable processes on the system by which the priority of a process can change resluts give most high priority process will be executed in next.
Process priority - we give some special priority to a process while executing or before creating a process.
There are two methods to handle the process priority.
1.nice -n (nice value) (pgmname)
it is used for to set the priority before creating a process or run application.
2.renice -n (nice value) (pidofpgm) it is used for changing or altering the priority of a process while it executes in realtime processes.
There are two type of processes:
1.normal process or user process.
2.realtime process
In normal process we can alter the value of priority using nice command.
How stuff nice value works:
PR = 20+NI ( NI can be -20 to 19)
If PR = 20+19 = 39
it is maximum value and has low priority.
If PR = 20-19=1
It is minimum value and has high priority.
It is all applicable for only to normal processes that are created by user.
Realtime process:
It is a process that has predefined time limits to run and it invoked by realtime sheduling and cannot be interrupt by any other processes while it is in execution but it is possible to alter it by change in scheduling algorithm in kernal.
We will see how to alter or change the realtime sheduling in the next video...
Telegram: @noobkiddie
Thanks for all❤.