First of all, the answer is a little long, but it is only for clarification.
As with the linux kernel, every regular process can have priorities called static priority, from 100 (highest) to 139 (lowest). therefore, there are basically 40 priorities that can be assigned to a process.
therefore, when any process is created, it gets the priority of the parent, but if the user wants to change its priority, this can be done using the nice (nice_value) system call.
& the reason for your question is that every process wants a base time quantum, which is used as the time during which the process will receive the processor to execute it in milliseconds, and this is calculated as
time={ if static_priority<120 (140-static_priority)*20 if static_priority>=120 (140-static_priority)*5
, so the sys_nice () service service processes the nice () system call. Although nice_value can have any value, absolute values in excess of 40 are reduced to 40. Traditionally, negative values correspond to requests for priority increments and require superuser privileges, while positive values correspond to requests for lowering priorities. If nice_value is negative, the function calls able () to check if the process has the CAP_SYS_NICE capability. In addition, the function calls hook_task_setnice () hook. , therefore, at the end, nice_value is used to calculate the static priority, and then this static priority is used to calculate the base time quantum.
, therefore, it is clear that to increase the priority, the -ve values are used, therefore, access to the priority requires superuser access, and the values + ve are used to decrease the priority, so there is no need for superuser access.