Advanced CPU Scheduling
Real-time scheduling bounds individual response times. Work stealing instead distributes parallel work, with a bound shaped by both total work and critical path.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 3
- Reading time
- 2 min
In this article3 chapters
Interference determines a worst-case response
For independent sporadic tasks on one preemptible fixed-priority processor, let \(C_i\) be execution time and \(T_i\) the minimum interarrival time. With no blocking and negligible overhead, the response-time recurrence for task \(i\) takes the form
\[ R_i=C_i+\sum_{j\in\mathrm{hp}(i)} \left\lceil\frac{R_i}{T_j}\right\rceil C_j . \]
The ceiling counts how many releases of each higher-priority task can interfere. Start from the task’s own execution time and iterate the right side. A suitable fixed point no larger than the deadline certifies the task under the model. For example, a task with cost three and a higher-priority task of cost one every five units reaches response time four.
Rate-monotonic scheduling tests deadlines for one class of periodic workloads. Work and span describe a separate parallel objective in which aggregate work and a longest dependency path bound speedup.
Work stealing follows a different proof
A work-stealing scheduler lets an idle worker take ready tasks from another queue. For fully strict computations with a suitable randomized scheduler, expected execution on \(P\) processors is bounded in terms of
\[ \frac{T_1}{P}+O(T_\infty), \]
where the first term is total work divided by processors and the second is governed by the critical path. This gives a throughput-oriented bound for a computation graph. It does not by itself bound the latency of every individual request.
The workload defines which bound is useful
Lock blocking, processor migration, interrupts and memory contention may add further terms to response analysis. Measuring average latency cannot establish a worst-case deadline. A real system can use measurements to validate cost assumptions, then use a scheduling proof under a declared arrival model. Compare heterogeneous memory, queueing in network I/O, and model-checking assumptions in temporal logic.[1][2]