What is the difference between renice and chrt commands in Linux?
chrt(1) is used not only to change the priority of a process, but also the scheduling policy. The scheduling policy can be four:
renice(8) just change the priority of a process.
Well, I found this on http://www.spinics.net/lists/linux-rt-users/msg03987.html which explains the difference pretty nicely:
... "nice" is an historic utility which was used in the early days of batch computing to be "nice" to other users and give up some CPU time. It's still in use and useful and applies only to processes which run with the SCHED_OTHER policy on Linux.
"chrt" is a tool to change scheduling policy (SCHED_OTHER, SCHED_FIFO, SCHED_RR) and the priority of a process/task. With chrt you can either start a process with such a policy or modify an already running process/tasks policy. You need to have the permissions to do that.
So the main difference is that "nice" can only operate within the nice levels of the SCHED_OTHER policy while "chrt" can change the policy and the priority of a process/task.