Stories
Slash Boxes
Comments

SoylentNews is people

Submission Preview

Link to Story

Linux kernel preemption and the latency-throughput tradeoff

Accepted submission by Anonymous Coward at 2019-12-23 16:20:11
OS

https://www.codeblueprint.co.uk/2019/12/23/linux-preemption-latency-throughput.html [codeblueprint.co.uk]

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.


Original Submission