Linux & OS Internals
CPU scheduling classes
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.
What you will be able to do
- Explain how real-time policies and nice values differ in what they control.
- Decide which policy a process should run under, and check the policies on a host before changing any of them.
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
- fork exec waitIntermediate · 4 min
Explain how fork and exec create a new program, how the parent collects the child's status, and why an inherited descriptor can keep a port or pipe open.
- Threads and pthreadsIntermediate · 4 min
Explain how threads share a process's memory and descriptors, why shared memory needs locks, and why a higher thread count does not speed up lock-bound work.
- 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…
- Run queuesIntermediate · 4 min
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.
- 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.