Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1629 → Rev 1630

/advdemos/trunk/elastic/initfile.c
50,7 → 50,7
struct multiboot_info *mb = (struct multiboot_info *)arg;
 
EDF_register_level(EDF_ENABLE_ALL);
ELASTIC_register_level(ELASTIC_ENABLE_ALL, 0, MAX_BANDWIDTH/2);
ELASTIC_register_level(ELASTIC_ENABLE_ALL, 0, MAX_BANDWIDTH);
RR_register_level(RRTICK, RR_MAIN_YES, mb);
dummy_register_level();
 
/advdemos/trunk/elastic/elastic.c
45,16 → 45,16
 
int main(int argc, char **argv)
{
ELASTIC_TASK_MODEL e1, e2, e3;
PID el_pid1, el_pid2, el_pid3;
ELASTIC_TASK_MODEL e1, e2, e3, e4;
PID el_pid1, el_pid2, el_pid3, el_pid4;
 
cprintf("Elastic Task Demo (U=0.5 in initfile.c)\n");
cprintf("Elastic Task Demo (U=1.0 in initfile.c)\n");
 
cprintf("Creating elastic task with Tmin = 100000, C = 20000, E = 0\n");
cprintf("Creating elastic task with Tmin = 100000, Tmax = 500000, C = 30000, E = 1\n");
elastic_task_default_model(e1);
elastic_task_def_period(e1, 100000, 100000);
elastic_task_def_wcet(e1, 20000);
elastic_task_def_param(e2, 0, PERIOD_SCALING);
elastic_task_def_period(e1, 100000, 500000);
elastic_task_def_wcet(e1, 30000);
elastic_task_def_param(e1, 1, PERIOD_SCALING);
elastic_task_def_arg(e1, (void *)1);
el_pid1 = task_create("Elastic1",elastic_test,&e1,NULL);
if (el_pid1 == NIL) {
63,11 → 63,11
}
task_activate(el_pid1);
 
cprintf("\nCreating elastic task with Tmin = 200000, C = 80000, E = 2\n");
cprintf("\nCreating elastic task with Tmin = 200000, Tmax = 500000, C = 60000, E = 1\n");
elastic_task_default_model(e2);
elastic_task_def_period(e2, 200000, 400000);
elastic_task_def_wcet(e2, 80000);
elastic_task_def_param(e2, 2, PERIOD_SCALING);
elastic_task_def_period(e2, 200000, 500000);
elastic_task_def_wcet(e2, 60000);
elastic_task_def_param(e2, 1, PERIOD_SCALING);
elastic_task_def_arg(e2, (void *)2);
el_pid2 = task_create("Elastic2",elastic_test,&e2,NULL);
if (el_pid2 == NIL) {
76,10 → 76,10
}
task_activate(el_pid2);
 
cprintf("\nCreating elastic task with Tmin = 400000, C = 40000, E = 1\n");
cprintf("\nCreating elastic task with Tmin = 300000, Tmax = 500000, C = 90000, E = 1\n");
elastic_task_default_model(e3);
elastic_task_def_period(e3, 400000, 2000000);
elastic_task_def_wcet(e3, 40000);
elastic_task_def_period(e3, 300000, 500000);
elastic_task_def_wcet(e3, 90000);
elastic_task_def_param(e3, 1, PERIOD_SCALING);
elastic_task_def_arg(e3, (void *)3);
el_pid3 = task_create("Elastic3",elastic_test,&e3,NULL);
89,6 → 89,18
}
task_activate(el_pid3);
 
cprintf("\nCreating elastic task with Tmin = 50000, Tmax = 500000, C = 24000, E = 0\n");
elastic_task_default_model(e4);
elastic_task_def_period(e4, 50000, 500000);
elastic_task_def_wcet(e4, 24000);
elastic_task_def_param(e4, 0, PERIOD_SCALING);
elastic_task_def_arg(e4, (void *)4);
el_pid4 = task_create("Elastic4",elastic_test,&e4,NULL);
if (el_pid4 == NIL) {
cprintf("ERROR: Cannot create Elastic4\n");
sys_end();
}
task_activate(el_pid4);
/* Exit at time t = 5.0 */
struct timespec t;