diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-11-26 14:42:45 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2014-02-19 15:53:00 -0500 |
commit | ecfe8654b8d9e433967792f8087b17e4dac3f076 (patch) | |
tree | 077b3c136e16d44afcad27c24bd79d6e4299fac1 | |
parent | 6a76ccc5091bd352860b7d74946c99d9d6e83369 (diff) |
Add support for job splitting.ecrts14-pgm-final
This patch adds support for job splittinig schedulers.
The default split factor for jobs is 1 (unchanged behavior).
-rw-r--r-- | bin/rtspin.c | 7 | ||||
-rw-r--r-- | src/litmus.c | 1 | ||||
-rw-r--r-- | src/task.c | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/bin/rtspin.c b/bin/rtspin.c index b4156cc..b518574 100644 --- a/bin/rtspin.c +++ b/bin/rtspin.c | |||
@@ -184,7 +184,7 @@ static int job(double exec_time, double program_end, int lock_od, double cs_leng | |||
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | #define OPTSTR "p:c:wlveo:f:s:q:X:L:Q:" | 187 | #define OPTSTR "p:c:wlveo:f:s:q:X:L:Q:n:" |
188 | int main(int argc, char** argv) | 188 | int main(int argc, char** argv) |
189 | { | 189 | { |
190 | int ret; | 190 | int ret; |
@@ -192,6 +192,7 @@ int main(int argc, char** argv) | |||
192 | lt_t period; | 192 | lt_t period; |
193 | double wcet_ms, period_ms; | 193 | double wcet_ms, period_ms; |
194 | unsigned int priority = LITMUS_LOWEST_PRIORITY; | 194 | unsigned int priority = LITMUS_LOWEST_PRIORITY; |
195 | int split_factor = 1; | ||
195 | int migrate = 0; | 196 | int migrate = 0; |
196 | int cluster = 0; | 197 | int cluster = 0; |
197 | int opt; | 198 | int opt; |
@@ -225,6 +226,9 @@ int main(int argc, char** argv) | |||
225 | cluster = atoi(optarg); | 226 | cluster = atoi(optarg); |
226 | migrate = 1; | 227 | migrate = 1; |
227 | break; | 228 | break; |
229 | case 'n': | ||
230 | split_factor = atoi(optarg); | ||
231 | break; | ||
228 | case 'q': | 232 | case 'q': |
229 | priority = atoi(optarg); | 233 | priority = atoi(optarg); |
230 | if (!litmus_is_valid_fixed_prio(priority)) | 234 | if (!litmus_is_valid_fixed_prio(priority)) |
@@ -330,6 +334,7 @@ int main(int argc, char** argv) | |||
330 | init_rt_task_param(¶m); | 334 | init_rt_task_param(¶m); |
331 | param.exec_cost = wcet; | 335 | param.exec_cost = wcet; |
332 | param.period = period; | 336 | param.period = period; |
337 | param.split = split_factor; | ||
333 | param.priority = priority; | 338 | param.priority = priority; |
334 | param.cls = class; | 339 | param.cls = class; |
335 | param.budget_policy = (want_enforcement) ? | 340 | param.budget_policy = (want_enforcement) ? |
diff --git a/src/litmus.c b/src/litmus.c index 4631eea..a05c180 100644 --- a/src/litmus.c +++ b/src/litmus.c | |||
@@ -103,6 +103,7 @@ void init_rt_task_param(struct rt_task* tp) | |||
103 | tp->priority = LITMUS_LOWEST_PRIORITY; | 103 | tp->priority = LITMUS_LOWEST_PRIORITY; |
104 | tp->budget_policy = NO_ENFORCEMENT; | 104 | tp->budget_policy = NO_ENFORCEMENT; |
105 | tp->release_policy = TASK_SPORADIC; | 105 | tp->release_policy = TASK_SPORADIC; |
106 | tp->split = 1; | ||
106 | } | 107 | } |
107 | 108 | ||
108 | task_class_t str2class(const char* str) | 109 | task_class_t str2class(const char* str) |
@@ -49,6 +49,7 @@ int __create_rt_task(rt_fn_t rt_prog, void *arg, int cluster, | |||
49 | params.exec_cost = wcet; | 49 | params.exec_cost = wcet; |
50 | params.cls = class; | 50 | params.cls = class; |
51 | params.phase = 0; | 51 | params.phase = 0; |
52 | params.split = 1; | ||
52 | params.priority = priority; | 53 | params.priority = priority; |
53 | /* enforce budget for tasks that might not use sleep_next_period() */ | 54 | /* enforce budget for tasks that might not use sleep_next_period() */ |
54 | params.budget_policy = QUANTUM_ENFORCEMENT; | 55 | params.budget_policy = QUANTUM_ENFORCEMENT; |