Get the latest tech news

Understanding the Linux Kernel: The Scheduler


In the previous article we looked at how the kernel gives every process its own private view of memory. But memory is only half of what a process needs to actually run. The other half is the CPU itself — and there are only so many CPUs in a machine, while there are usually hundreds or thousands of things that want to run on them. So somebody has to decide, constantly, who gets a CPU and for how long. That somebody is the scheduler. Every few milliseconds, on every core, the kernel asks itself the same question — of everything that wants to run right now, who runs next? — and the answer has to be fast, fair, and good enough that your text editor stays responsive even while a compile is pegging every core.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of linux kernel

linux kernel

Photo of scheduler

scheduler

Related news:

News photo

Benchmarking The Different CachyOS Linux Kernel Flavors

News photo

The Linux Kernel Ready To Make TSC A Hard Requirement For x86 CPUs

News photo

AMD Expands The Range Of Zen 6 CPUs Detected By The Linux Kernel