Forty Milliseconds Each
Linux weights tasks by nice level (sched_prio_to_weight in kernel/sched/core.c):
| nice | weight |
|---|---|
| -5 | 3121 |
| 0 | 1024 |
| 5 | 335 |
calc_delta_fair() in kernel/sched/fair.c advances a task's vruntime by
Two CPU-bound tasks share one CPU: T0 at nice 0 and T5 at nice 5. Each has now run for exactly 40 ms of real CPU time. What are their vruntime values, and which runs next?
Sign in to answer questions and track your progress
Sign In