@Goldlilock's answer directed me to do the research in the right path. This is my research details.
Scheduling Algorithms available for processes
Linux supports 3 scheduling policies.
SCHED_OTHER is the default universal time-sharing scheduler policy used by most processes;
SCHED_RR are intended for special time-critical applications that need precise control over the way in which runnable processes are selected for execution.
In order to select a process to run, the Linux scheduler must consider the priority of each process. Actually, there are two kinds of priority.
A static priority value is assigned to each process and scheduling depends on this static priority. Processes scheduled with
SCHED_OTHER have static priority 0; processes scheduled under
SCHED_RR can have a static priority in the range
99(99 is the highest).
sys_sched_get_priority_max( ) routine returns the static priority of the process,
0 for non-realtime processes.
Dynamic priority is used for non-real time applications.
All real-time processes are at a higher priority than normal processes. Linux implements real-time priorities in accordance with POSIX. The below graph might give an overview of how the processes are scheduled with their priorities.
HIGH PRIORITY – - – - – > – - – - – > – - – - – > – - – - – > – - – – LEAST PRIORITY
……..real time priority (static priority)…….| …. nice value (dynamic priority) …..
99 ……………………….. 50 ……………………… 1 | -20 …….. -10 …….. 0 …….. 10 ……. 19
Now, we can issue the below command to check the real time priority of a process. Here I am using watchdog since it had a nice value listed as -.
ps -e -o class,rtprio,pri,nice,cmd | grep watchdog
This is the above command's output. As we can see the realtime priority is 99 which is the highest possible priority.
FF 99 139 - [watchdog/0]
FF 99 139 - [watchdog/1]
TS - 21 0 grep watchdog
So as per my understanding the real time priority can take a maximum value of 99 and so there can not be any nice value over it. That is the reason, we get the nice output as - for watchdog and other system processes.