diff options
author | Luca Abeni <luca.abeni@unitn.it> | 2015-05-18 09:00:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 02:39:21 -0400 |
commit | 134136c4b730c1a4830a8b74e2717d858291361b (patch) | |
tree | 4109e7508bc5657c928ab01393a3f17cfbb02292 /Documentation/scheduler | |
parent | e0deda8142a60e4a39d5ba2ea47294a851b4309a (diff) |
sched/dl/Documentation: Add some references
Add a description of the Dhall's effect, some discussion about
schedulability tests for global EDF, and references to real-time
literature.
Signed-off-by: Luca Abeni <luca.abeni@unitn.it>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: henrik@austad.us
Cc: juri.lelli@gmail.com
Cc: raistlin@linux.it
Link: http://lkml.kernel.org/r/1431954032-16473-8-git-send-email-luca.abeni@unitn.it
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'Documentation/scheduler')
-rw-r--r-- | Documentation/scheduler/sched-deadline.txt | 73 |
1 files changed, 67 insertions, 6 deletions
diff --git a/Documentation/scheduler/sched-deadline.txt b/Documentation/scheduler/sched-deadline.txt index bd4123b761e5..984a01d3c68f 100644 --- a/Documentation/scheduler/sched-deadline.txt +++ b/Documentation/scheduler/sched-deadline.txt | |||
@@ -163,7 +163,8 @@ CONTENTS | |||
163 | maximum tardiness of each task is smaller or equal than | 163 | maximum tardiness of each task is smaller or equal than |
164 | ((M − 1) · WCET_max − WCET_min)/(M − (M − 2) · U_max) + WCET_max | 164 | ((M − 1) · WCET_max − WCET_min)/(M − (M − 2) · U_max) + WCET_max |
165 | where WCET_max = max{WCET_i} is the maximum WCET, WCET_min=min{WCET_i} | 165 | where WCET_max = max{WCET_i} is the maximum WCET, WCET_min=min{WCET_i} |
166 | is the minimum WCET, and U_max = max{WCET_i/P_i} is the maximum utilization. | 166 | is the minimum WCET, and U_max = max{WCET_i/P_i} is the maximum |
167 | utilization[12]. | ||
167 | 168 | ||
168 | If M=1 (uniprocessor system), or in case of partitioned scheduling (each | 169 | If M=1 (uniprocessor system), or in case of partitioned scheduling (each |
169 | real-time task is statically assigned to one and only one CPU), it is | 170 | real-time task is statically assigned to one and only one CPU), it is |
@@ -205,11 +206,48 @@ CONTENTS | |||
205 | 206 | ||
206 | On multiprocessor systems with global EDF scheduling (non partitioned | 207 | On multiprocessor systems with global EDF scheduling (non partitioned |
207 | systems), a sufficient test for schedulability can not be based on the | 208 | systems), a sufficient test for schedulability can not be based on the |
208 | utilizations (it can be shown that task sets with utilizations slightly | 209 | utilizations or densities: it can be shown that even if D_i = P_i task |
209 | larger than 1 can miss deadlines regardless of the number of CPUs M). | 210 | sets with utilizations slightly larger than 1 can miss deadlines regardless |
210 | However, as previously stated, enforcing that the total utilization is smaller | 211 | of the number of CPUs. |
211 | than M is enough to guarantee that non real-time tasks are not starved and | 212 | |
212 | that the tardiness of real-time tasks has an upper bound. | 213 | Consider a set {Task_1,...Task_{M+1}} of M+1 tasks on a system with M |
214 | CPUs, with the first task Task_1=(P,P,P) having period, relative deadline | ||
215 | and WCET equal to P. The remaining M tasks Task_i=(e,P-1,P-1) have an | ||
216 | arbitrarily small worst case execution time (indicated as "e" here) and a | ||
217 | period smaller than the one of the first task. Hence, if all the tasks | ||
218 | activate at the same time t, global EDF schedules these M tasks first | ||
219 | (because their absolute deadlines are equal to t + P - 1, hence they are | ||
220 | smaller than the absolute deadline of Task_1, which is t + P). As a | ||
221 | result, Task_1 can be scheduled only at time t + e, and will finish at | ||
222 | time t + e + P, after its absolute deadline. The total utilization of the | ||
223 | task set is U = M · e / (P - 1) + P / P = M · e / (P - 1) + 1, and for small | ||
224 | values of e this can become very close to 1. This is known as "Dhall's | ||
225 | effect"[7]. Note: the example in the original paper by Dhall has been | ||
226 | slightly simplified here (for example, Dhall more correctly computed | ||
227 | lim_{e->0}U). | ||
228 | |||
229 | More complex schedulability tests for global EDF have been developed in | ||
230 | real-time literature[8,9], but they are not based on a simple comparison | ||
231 | between total utilization (or density) and a fixed constant. If all tasks | ||
232 | have D_i = P_i, a sufficient schedulability condition can be expressed in | ||
233 | a simple way: | ||
234 | sum(WCET_i / P_i) <= M - (M - 1) · U_max | ||
235 | where U_max = max{WCET_i / P_i}[10]. Notice that for U_max = 1, | ||
236 | M - (M - 1) · U_max becomes M - M + 1 = 1 and this schedulability condition | ||
237 | just confirms the Dhall's effect. A more complete survey of the literature | ||
238 | about schedulability tests for multi-processor real-time scheduling can be | ||
239 | found in [11]. | ||
240 | |||
241 | As seen, enforcing that the total utilization is smaller than M does not | ||
242 | guarantee that global EDF schedules the tasks without missing any deadline | ||
243 | (in other words, global EDF is not an optimal scheduling algorithm). However, | ||
244 | a total utilization smaller than M is enough to guarantee that non real-time | ||
245 | tasks are not starved and that the tardiness of real-time tasks has an upper | ||
246 | bound[12] (as previously noted). Different bounds on the maximum tardiness | ||
247 | experienced by real-time tasks have been developed in various papers[13,14], | ||
248 | but the theoretical result that is important for SCHED_DEADLINE is that if | ||
249 | the total utilization is smaller or equal than M then the response times of | ||
250 | the tasks are limited. | ||
213 | 251 | ||
214 | SCHED_DEADLINE can be used to schedule real-time tasks guaranteeing that | 252 | SCHED_DEADLINE can be used to schedule real-time tasks guaranteeing that |
215 | the jobs' deadlines of a task are respected. In order to do this, a task | 253 | the jobs' deadlines of a task are respected. In order to do this, a task |
@@ -245,6 +283,29 @@ CONTENTS | |||
245 | Concerning the Preemptive Scheduling of Periodic Real-Time tasks on | 283 | Concerning the Preemptive Scheduling of Periodic Real-Time tasks on |
246 | One Processor. Real-Time Systems Journal, vol. 4, no. 2, pp 301-324, | 284 | One Processor. Real-Time Systems Journal, vol. 4, no. 2, pp 301-324, |
247 | 1990. | 285 | 1990. |
286 | 7 - S. J. Dhall and C. L. Liu. On a real-time scheduling problem. Operations | ||
287 | research, vol. 26, no. 1, pp 127-140, 1978. | ||
288 | 8 - T. Baker. Multiprocessor EDF and Deadline Monotonic Schedulability | ||
289 | Analysis. Proceedings of the 24th IEEE Real-Time Systems Symposium, 2003. | ||
290 | 9 - T. Baker. An Analysis of EDF Schedulability on a Multiprocessor. | ||
291 | IEEE Transactions on Parallel and Distributed Systems, vol. 16, no. 8, | ||
292 | pp 760-768, 2005. | ||
293 | 10 - J. Goossens, S. Funk and S. Baruah, Priority-Driven Scheduling of | ||
294 | Periodic Task Systems on Multiprocessors. Real-Time Systems Journal, | ||
295 | vol. 25, no. 2–3, pp. 187–205, 2003. | ||
296 | 11 - R. Davis and A. Burns. A Survey of Hard Real-Time Scheduling for | ||
297 | Multiprocessor Systems. ACM Computing Surveys, vol. 43, no. 4, 2011. | ||
298 | http://www-users.cs.york.ac.uk/~robdavis/papers/MPSurveyv5.0.pdf | ||
299 | 12 - U. C. Devi and J. H. Anderson. Tardiness Bounds under Global EDF | ||
300 | Scheduling on a Multiprocessor. Real-Time Systems Journal, vol. 32, | ||
301 | no. 2, pp 133-189, 2008. | ||
302 | 13 - P. Valente and G. Lipari. An Upper Bound to the Lateness of Soft | ||
303 | Real-Time Tasks Scheduled by EDF on Multiprocessors. Proceedings of | ||
304 | the 26th IEEE Real-Time Systems Symposium, 2005. | ||
305 | 14 - J. Erickson, U. Devi and S. Baruah. Improved tardiness bounds for | ||
306 | Global EDF. Proceedings of the 22nd Euromicro Conference on | ||
307 | Real-Time Systems, 2010. | ||
308 | |||
248 | 309 | ||
249 | 4. Bandwidth management | 310 | 4. Bandwidth management |
250 | ======================= | 311 | ======================= |