Q4
What is CPU scheduling in Linux?
💬Answer
CPU scheduling decides which process gets execution time on a CPU core. Modern Linux uses the Completely Fair Scheduler (CFS):
- CFS models a "perfect multi-tasking CPU" on real hardware.
- It tracks execution time for each process using a metric called Virtual Runtime (
vruntime). - The scheduler always selects the process with the smallest
vruntimeto run next, utilizing a Red-Black tree structure to retrieve processes in $O(\log N)$ time.
Related Linux Questions
View All LinuxQuestions →Q1
Explain what Linux is and why it is widely used in DevOps environments.
Q2What is the Linux kernel and what role does it play in the operating system?
Q3Explain the Linux filesystem hierarchy and the purpose of /etc, /var, /home, /tmp, and /usr.
Q4What happens internally when you run the `ls` command in Linux?

Created by
Apurv Gujjar
DevOps & Cloud Engineer
Specialized in:DevOpsAWSGCPKubernetesTerraformDocker
View Portfolio