Grokking Operating Systems and Networking for Backend Engineers
Vote

0% completed

​

How the Scheduler Shares the CPU

Four copies of a busy Python loop ran for five seconds on a cloud server with 2 CPUs. None of them ever waited for the network, a disk, or a timer. The kernel's own accounting for them read:

Output:

4 busy workers, 2 CPUs, 5 seconds worker nice on CPU waiting share times on CPU avg slice 1 0 2.32 s 2.68 s 46% 1245 1.9 ms 2 0 2.74 s 2.26 s 55% 1401 2.0 ms 3 0 2.40 s 2.61 s 48% 1211 2.0 ms 4 0 2.48 s 2.52 s 50% 1321 1.9 ms

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content