summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dag11
-rw-r--r--extra.h36
-rwxr-xr-xrun_case_study_dag.py2
3 files changed, 33 insertions, 16 deletions
diff --git a/dag b/dag
index 9180799..3027455 100644
--- a/dag
+++ b/dag
@@ -1 +1,10 @@
10, localization_qcif, loc001, 100, 15, loc, 1, 50, 1, 0, 50, 50 \ No newline at end of file 10, texture_synthesis_qcif, texture_synthesis_qcif__A, 50, 1, 300, 1, 123, 1, 0, 6, 6
20, disparity_qcif, disparity_qcif__B, 50, 1, 305, 1, 123, 1, 6, 19, 19
30, mser_qcif, mser_qcif__C, 50, 1, 306, 1, 123, 1, 24, 7, 7
40, localization_qcif, localization_qcif__D, 50, 1, 307, 1, 123, 1, 31, 34, 34
50, sift_qcif, sift_qcif__E, 50, 1, 308, 1, 123, 1, 64, 54, 54
60, texture_synthesis_qcif, texture_synthesis_qcif__J, 50, 1, 309, 1, 123, 1, 117, 6, 6
70, stitch_qcif, stitch_qcif__F, 50, 2, 301, 1, 123, 1, 6, 27, 27
80, tracking_qcif, tracking_qcif__G, 50, 2, 302, 1, 123, 1, 32, 9, 9
90, svm_qcif, svm_qcif__H, 50, 2, 303, 1, 123, 1, 41, 38, 38
100, stitch_qcif, stitch_qcif__I, 50, 2, 304, 1, 123, 1, 79, 27, 27 \ No newline at end of file
diff --git a/extra.h b/extra.h
index 9da536d..a4a3d9c 100644
--- a/extra.h
+++ b/extra.h
@@ -403,12 +403,12 @@ static void _rt_write_to_file() {
403 } 403 }
404 fclose(fp); 404 fclose(fp);
405out: 405out:
406#if LITMUS 406// #if LITMUS
407 if (task_mode(BACKGROUND_TASK) != 0) { 407// if (task_mode(BACKGROUND_TASK) != 0) {
408 perror("Unable to become a real-time task"); 408// perror("Unable to become a real-time task");
409 exit(1); 409// exit(1);
410 } 410// }
411#endif /* LITMUS */ 411// #endif /* LITMUS */
412#ifdef PAIRED 412#ifdef PAIRED
413 munmap(_rt_barrier, 2); 413 munmap(_rt_barrier, 2);
414 sem_unlink(_rt_sem1_name); 414 sem_unlink(_rt_sem1_name);
@@ -428,7 +428,8 @@ out:
428// Start a job 428// Start a job
429static void _rt_start_loop() { 429static void _rt_start_loop() {
430 // Let the first job run before synchrnous release --- make sure we have no further page faults 430 // Let the first job run before synchrnous release --- make sure we have no further page faults
431 if(first_job){ 431 if(first_job == 1){
432 // FLUSH_CACHES
432 return; 433 return;
433 } 434 }
434#if LITMUS 435#if LITMUS
@@ -442,7 +443,7 @@ static void _rt_start_loop() {
442 else{ 443 else{
443 if (sleep_next_period() != 0) { 444 if (sleep_next_period() != 0) {
444 perror("Unable to sleep for next period"); 445 perror("Unable to sleep for next period");
445 } 446 }
446 } 447 }
447 448
448 // if (last == 0) { 449 // if (last == 0) {
@@ -479,7 +480,7 @@ static void _rt_start_loop() {
479static void _rt_stop_loop() { 480static void _rt_stop_loop() {
480 clock_gettime(CLOCK_MONOTONIC, &_rt_end); 481 clock_gettime(CLOCK_MONOTONIC, &_rt_end);
481 // Set first_job == 0 482 // Set first_job == 0
482 if(first_job){ 483 if(first_job == 1){
483 first_job = 0; 484 first_job = 0;
484 return; 485 return;
485 } 486 }
@@ -493,13 +494,20 @@ static void _rt_stop_loop() {
493 long long end = _rt_end_time[_rt_jobs_complete]; 494 long long end = _rt_end_time[_rt_jobs_complete];
494 if (end > _rt_cp->deadline) { 495 if (end > _rt_cp->deadline) {
495 fprintf(stderr, "(%s/%d:%lu) ", _rt_our_prog_name, gettid(), _rt_cp->job_index); 496 fprintf(stderr, "(%s/%d:%lu) ", _rt_our_prog_name, gettid(), _rt_cp->job_index);
496 fprintf(stderr, " tardy %llu ns, " 497 fprintf(stderr, "tardy %llu ns, relative tardiness %f\n", end - _rt_cp->deadline, (end - _rt_cp->deadline) / (double)_rt_deadline);
497 "relative tardiness %f\n",
498 end - _rt_cp->deadline,
499 (end - _rt_cp->deadline) / (double)_rt_deadline);
500 } 498 }
501#endif 499#endif
502 _rt_jobs_complete++; 500 _rt_jobs_complete++;
501#if LITMUS
502 if(_rt_jobs_complete == _rt_max_jobs){
503 // fprintf(stderr, "complete %s: %d\n" , _rt_our_prog_name, _rt_jobs_complete);
504 if (task_mode(BACKGROUND_TASK) != 0) {
505 perror("Unable to become background task");
506 exit(1);
507 }
508 }
509#endif
510
503} 511}
504 512
505/****** New API ****** 513/****** New API ******
diff --git a/run_case_study_dag.py b/run_case_study_dag.py
index 716c89b..65314a8 100755
--- a/run_case_study_dag.py
+++ b/run_case_study_dag.py
@@ -99,7 +99,7 @@ def main(pathName):
99 ### Allocate Cache Ways ### 99 ### Allocate Cache Ways ###
100 run('mount -t resctrl resctrl /sys/fs/resctrl') 100 run('mount -t resctrl resctrl /sys/fs/resctrl')
101 # run('sudo echo "L3:0=0000;1=0000;2=0000;3=ffff" | sudo tee /sys/fs/resctrl/schemata') 101 # run('sudo echo "L3:0=0000;1=0000;2=0000;3=ffff" | sudo tee /sys/fs/resctrl/schemata')
102 run('sudo echo "L3:0=0000;1=0000;2=0000;3=000f" | sudo tee /sys/fs/resctrl/schemata') 102 # run('sudo echo "L3:0=0000;1=0000;2=0000;3=000f" | sudo tee /sys/fs/resctrl/schemata')
103 for core in range(16): 103 for core in range(16):
104 if core not in all_cores: 104 if core not in all_cores:
105 continue 105 continue