aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2011-10-12 22:46:21 -0400
committerChristopher Kenna <cjk@cs.unc.edu>2011-10-12 22:46:21 -0400
commit4b76975731431458e78b649b04e682a8516a07da (patch)
tree19438ff4d16b5a965641e23e1c343d6e1b40e96d
parentde112da123054cb6f3eb8d8278e0547a0030264c (diff)
support scaling, but not beyond WCET
-rw-r--r--bin/rtspin.beta.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/rtspin.beta.c b/bin/rtspin.beta.c
index 9dbe845..852b421 100644
--- a/bin/rtspin.beta.c
+++ b/bin/rtspin.beta.c
@@ -256,8 +256,11 @@ int main(int argc, char** argv)
256 256
257 do { 257 do {
258 beta_sample = gsl_ran_beta(beta_rng, alpha, beta); 258 beta_sample = gsl_ran_beta(beta_rng, alpha, beta);
259 /* convert to seconds and scale */ 259 exec_time = wcet * beta_sample * scale;
260 exec_time = wcet * beta_sample * 0.000000001 * scale; 260 if (exec_time > wcet)
261 exec_time = wcet;
262 /* convert to seconds */
263 exec_time = exec_time * 0.000000001;
261 } while(job(exec_time, start + duration)); 264 } while(job(exec_time, start + duration));
262 265
263 ret = task_mode(BACKGROUND_TASK); 266 ret = task_mode(BACKGROUND_TASK);