Linux & OS Internals
Run queues
Explain how the run queue holds ready tasks, how CFS picks the next one by virtual runtime, and why a long queue adds latency even when CPUs are not fully busy.
What you will be able to do
- Explain why runnable tasks wait in a queue, and how CFS chooses the next one.
- Decide whether a run queue is healthy by comparing its length with the CPU count.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Linux & OS Internals
- CPU scheduling classesIntermediate · 4 min
Explain how Linux picks the next thread by scheduling class, why real-time policies outrank normal ones, and what nice values change inside the normal class.
- Context switchingIntermediate · 4 min
Explain what a context switch costs in CPU time, how voluntary and nonvoluntary switches differ, and how to read switch rates against a healthy baseline and the request…
- NUMA localityIntermediate · 4 min
Explain how NUMA nodes make memory access cost depend on location, how the local allocation policy places pages at first touch, and how to check and fix remote memory…
- Virtual memoryIntermediate · 4 min
Explain how each process gets its own virtual address space, how pages are mapped on demand, and why VIRT and RES tell different stories about memory use.
- Page faultsIntermediate · 4 min
Explain the difference between minor and major page faults, why a major fault stalls a thread on disk, and how to read the counts from a process or a timed run.
- Copy on writeAdvanced · 4 min
Explain how a private file mapping shares pages until a write, how the write copies one page, and why writes rather than reads decide the memory cost of a shared model.