int pri = getpriority(PRIO_PROCESS, 2134);
printf("The original priority of 2134 is :%d", pri);
//cpu_usage of the process in top is 80%, pri is 39 and NICE value is 19
setpriority(PRIO_PROCESS, 20);
int p = getpriority(PRIO_PROCESS, 2134);
printf("priority is set to :%d", p);
Here I am trying to set a priority for a process(pid: 2134). In top command it is showing the priority is 39 and nice value is 19. So the priority of the process is very low. But the CPU usage of the process is above 70. If I set the priority to least value the CPU usage of that process should be reduced. I was confused whether to set the priority in the range of 40..1 or -19..20. Could anyone please check on this. Any help would be much appreciated.