Linux – the difference between renice and chrt commands in Linux

linuxscheduling

What is the difference between renice and chrt commands in Linux?

Best Answer

chrt(1) is used not only to change the priority of a process, but also the scheduling policy. The scheduling policy can be four:

  • SCHED_FIFO=first in, first out, real time processes.
  • SCHED_RR=round robin real time processes.
  • SCHED_OTHER=normal time sharing
  • SCHED_BATCH=almost the same as the SCHED_OTHER, but the process is considered always the most cpu consuming.

See setscheduler(2).

renice(8) just change the priority of a process.