diff options
author | Luca Abeni <luca.abeni@unitn.it> | 2014-09-09 05:57:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-09-16 04:23:00 -0400 |
commit | ad67dc316f000df4756b027f3559ad0491497d9e (patch) | |
tree | b6c7925333a3946ce2263bcbbcb87ae6d43417cb | |
parent | 8236d907ab3411ad452280faa8b26c1347327380 (diff) |
Documentation/scheduler/sched-deadline.txt: Fix terminology and improve clarity
Several small changes regarding SCHED_DEADLINE documentation
that fix terminology and improve clarity and readability:
- "current runtime" becomes "remaining runtime"
- readablity of an equation is improved by introducing more spacing
- clarify when admission control will certainly fail
- new URL for CBS technical report
- substitue "smallest" with "earliest"
Signed-off-by: Luca Abeni <luca.abeni@unitn.it>
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Reviewed-by: Henrik Austad <henrik@austad.us>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Dario Faggioli <raistlin@linux.it>
Cc: Juri Lelli <juri.lelli@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1410256636-26171-2-git-send-email-juri.lelli@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | Documentation/scheduler/sched-deadline.txt | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/Documentation/scheduler/sched-deadline.txt b/Documentation/scheduler/sched-deadline.txt index 18adc92a6b3b..a029891a8228 100644 --- a/Documentation/scheduler/sched-deadline.txt +++ b/Documentation/scheduler/sched-deadline.txt | |||
@@ -45,17 +45,17 @@ CONTENTS | |||
45 | every time the task wakes up, the scheduler computes a "scheduling deadline" | 45 | every time the task wakes up, the scheduler computes a "scheduling deadline" |
46 | consistent with the guarantee (using the CBS[2,3] algorithm). Tasks are then | 46 | consistent with the guarantee (using the CBS[2,3] algorithm). Tasks are then |
47 | scheduled using EDF[1] on these scheduling deadlines (the task with the | 47 | scheduled using EDF[1] on these scheduling deadlines (the task with the |
48 | smallest scheduling deadline is selected for execution). Notice that this | 48 | earliest scheduling deadline is selected for execution). Notice that this |
49 | guaranteed is respected if a proper "admission control" strategy (see Section | 49 | guaranteed is respected if a proper "admission control" strategy (see Section |
50 | "4. Bandwidth management") is used. | 50 | "4. Bandwidth management") is used. |
51 | 51 | ||
52 | Summing up, the CBS[2,3] algorithms assigns scheduling deadlines to tasks so | 52 | Summing up, the CBS[2,3] algorithms assigns scheduling deadlines to tasks so |
53 | that each task runs for at most its runtime every period, avoiding any | 53 | that each task runs for at most its runtime every period, avoiding any |
54 | interference between different tasks (bandwidth isolation), while the EDF[1] | 54 | interference between different tasks (bandwidth isolation), while the EDF[1] |
55 | algorithm selects the task with the smallest scheduling deadline as the one | 55 | algorithm selects the task with the earliest scheduling deadline as the one |
56 | to be executed first. Thanks to this feature, also tasks that do not | 56 | to be executed next. Thanks to this feature, tasks that do not strictly comply |
57 | strictly comply with the "traditional" real-time task model (see Section 3) | 57 | with the "traditional" real-time task model (see Section 3) can effectively |
58 | can effectively use the new policy. | 58 | use the new policy. |
59 | 59 | ||
60 | In more details, the CBS algorithm assigns scheduling deadlines to | 60 | In more details, the CBS algorithm assigns scheduling deadlines to |
61 | tasks in the following way: | 61 | tasks in the following way: |
@@ -64,45 +64,45 @@ CONTENTS | |||
64 | "deadline", and "period" parameters; | 64 | "deadline", and "period" parameters; |
65 | 65 | ||
66 | - The state of the task is described by a "scheduling deadline", and | 66 | - The state of the task is described by a "scheduling deadline", and |
67 | a "current runtime". These two parameters are initially set to 0; | 67 | a "remaining runtime". These two parameters are initially set to 0; |
68 | 68 | ||
69 | - When a SCHED_DEADLINE task wakes up (becomes ready for execution), | 69 | - When a SCHED_DEADLINE task wakes up (becomes ready for execution), |
70 | the scheduler checks if | 70 | the scheduler checks if |
71 | 71 | ||
72 | current runtime runtime | 72 | remaining runtime runtime |
73 | ---------------------------------- > ---------------- | 73 | ---------------------------------- > --------- |
74 | scheduling deadline - current time period | 74 | scheduling deadline - current time period |
75 | 75 | ||
76 | then, if the scheduling deadline is smaller than the current time, or | 76 | then, if the scheduling deadline is smaller than the current time, or |
77 | this condition is verified, the scheduling deadline and the | 77 | this condition is verified, the scheduling deadline and the |
78 | current budget are re-initialised as | 78 | remaining runtime are re-initialised as |
79 | 79 | ||
80 | scheduling deadline = current time + deadline | 80 | scheduling deadline = current time + deadline |
81 | current runtime = runtime | 81 | remaining runtime = runtime |
82 | 82 | ||
83 | otherwise, the scheduling deadline and the current runtime are | 83 | otherwise, the scheduling deadline and the remaining runtime are |
84 | left unchanged; | 84 | left unchanged; |
85 | 85 | ||
86 | - When a SCHED_DEADLINE task executes for an amount of time t, its | 86 | - When a SCHED_DEADLINE task executes for an amount of time t, its |
87 | current runtime is decreased as | 87 | remaining runtime is decreased as |
88 | 88 | ||
89 | current runtime = current runtime - t | 89 | remaining runtime = remaining runtime - t |
90 | 90 | ||
91 | (technically, the runtime is decreased at every tick, or when the | 91 | (technically, the runtime is decreased at every tick, or when the |
92 | task is descheduled / preempted); | 92 | task is descheduled / preempted); |
93 | 93 | ||
94 | - When the current runtime becomes less or equal than 0, the task is | 94 | - When the remaining runtime becomes less or equal than 0, the task is |
95 | said to be "throttled" (also known as "depleted" in real-time literature) | 95 | said to be "throttled" (also known as "depleted" in real-time literature) |
96 | and cannot be scheduled until its scheduling deadline. The "replenishment | 96 | and cannot be scheduled until its scheduling deadline. The "replenishment |
97 | time" for this task (see next item) is set to be equal to the current | 97 | time" for this task (see next item) is set to be equal to the current |
98 | value of the scheduling deadline; | 98 | value of the scheduling deadline; |
99 | 99 | ||
100 | - When the current time is equal to the replenishment time of a | 100 | - When the current time is equal to the replenishment time of a |
101 | throttled task, the scheduling deadline and the current runtime are | 101 | throttled task, the scheduling deadline and the remaining runtime are |
102 | updated as | 102 | updated as |
103 | 103 | ||
104 | scheduling deadline = scheduling deadline + period | 104 | scheduling deadline = scheduling deadline + period |
105 | current runtime = current runtime + runtime | 105 | remaining runtime = remaining runtime + runtime |
106 | 106 | ||
107 | 107 | ||
108 | 3. Scheduling Real-Time Tasks | 108 | 3. Scheduling Real-Time Tasks |
@@ -147,6 +147,8 @@ CONTENTS | |||
147 | and the absolute deadlines (d_j) coincide, so a proper admission control | 147 | and the absolute deadlines (d_j) coincide, so a proper admission control |
148 | allows to respect the jobs' absolute deadlines for this task (this is what is | 148 | allows to respect the jobs' absolute deadlines for this task (this is what is |
149 | called "hard schedulability property" and is an extension of Lemma 1 of [2]). | 149 | called "hard schedulability property" and is an extension of Lemma 1 of [2]). |
150 | Notice that if runtime > deadline the admission control will surely reject | ||
151 | this task, as it is not possible to respect its temporal constraints. | ||
150 | 152 | ||
151 | References: | 153 | References: |
152 | 1 - C. L. Liu and J. W. Layland. Scheduling algorithms for multiprogram- | 154 | 1 - C. L. Liu and J. W. Layland. Scheduling algorithms for multiprogram- |
@@ -156,7 +158,7 @@ CONTENTS | |||
156 | Real-Time Systems. Proceedings of the 19th IEEE Real-time Systems | 158 | Real-Time Systems. Proceedings of the 19th IEEE Real-time Systems |
157 | Symposium, 1998. http://retis.sssup.it/~giorgio/paps/1998/rtss98-cbs.pdf | 159 | Symposium, 1998. http://retis.sssup.it/~giorgio/paps/1998/rtss98-cbs.pdf |
158 | 3 - L. Abeni. Server Mechanisms for Multimedia Applications. ReTiS Lab | 160 | 3 - L. Abeni. Server Mechanisms for Multimedia Applications. ReTiS Lab |
159 | Technical Report. http://xoomer.virgilio.it/lucabe72/pubs/tr-98-01.ps | 161 | Technical Report. http://disi.unitn.it/~abeni/tr-98-01.pdf |
160 | 162 | ||
161 | 4. Bandwidth management | 163 | 4. Bandwidth management |
162 | ======================= | 164 | ======================= |