Linux Kernel Preemption and the Latency-Throughput Tradeoff
An Anonymous Coward writes:
https://www.codeblueprint.co.uk/2019/12/23/linux-preemption-latency-throughput.html
What is preemption?
Preemption, otherwise known as preemptive scheduling, is an operating system concept that allows running tasks to be forcibly interrupted by the kernel so that other tasks can run. Preemption is essential for fairly scheduling tasks and guaranteeing that progress is made because it prevents tasks from hogging the CPU either unwittingly or intentionally. And because it's handled by the kernel, it means that tasks don't have to worry about voluntarily giving up the CPU.
It can be useful to think of preemption as a way to reduce scheduler latency. But reducing latency usually also affects throughput, so there's a balance that needs to be maintained between getting a lot of work done (high throughput) and scheduling tasks as soon as they're ready to run (low latency).
The Linux kernel supports multiple preemption models so that you can tune the preemption behaviour for your workload.
Read more of this story at SoylentNews.