real time scheduling in Linux

后端 未结 4 1134
天命终不由人
天命终不由人 2020-12-07 17:49

This morning I read about Linux real time scheduling. As per the book \'Linux system programming by Robert Love\', there are two main scheduling there. One is SCHED_FIFO, fi

4条回答
  •  猫巷女王i
    2020-12-07 18:27

    My understanding of the two different classes is that a process SCHED_FIFO is never pre-empted by the kernel. Even if another "SCHED_FIFO" class process is waiting its turn...

    While SCHED_RR policy shares the cpu ressources a little bit more. The scheduler will let the SCHED_RR process run for a quanta of time, then pre-empt it only to let turn another SCHED_RR process. That is exactly Round Robin.

    SCHED_FIFO is "stronger" in the sense that if a SCHED_FIFO process never yield() to the kernel or invoke a system call on a single core device, then all your other Real time processes may never run.

提交回复
热议问题