What are some of the common SCHED_FIFO and SCHED_RR processes in Linux? Does user input falls under the cantegory of Real Time processes?
Have a look at this question. "Real time" (for a process) refers to the scheduling algorithm, or the thinking the kernel does when it decides which process gets to run. A real time process will preempt all other processes (of lesser scheduling weight) when an interrupt is received and it needs to run.
A program that just accepts user input is going to go to sleep (block) while waiting for the input, or even between keystrokes (depending). Such a program does not need to have such a high scheduling priority. RT processes should need to run ahead of every other process on the system. This could be because the process is critical to some crucial goal, or high performance timers are needed (in which case, you'd want a real time OS, which standard Linux is not).
Anyway, for an overview of the differences between SCHED_FIFO and SCHED_RR, see the question that I linked. The decision you should be making if contemplating one over the other is not if the program needs to run as RT, thats a fundamental engineering decision. Deciding between the two is just a matter of how you want your process to cooperate with others.
If I was using a standard kernel to control an elevator, the process that serviced hardware interrupts from the micro switches would probably be using SCHED_FIFO at a RT weight. Then again, I probably would not use standard Linux for that.
If I was writing an e-mail client, I'd use the standard scheduler and let the user nice
their running programs as they saw fit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With