diff options
| -rw-r--r-- | dag | 11 | ||||
| -rw-r--r-- | extra.h | 36 | ||||
| -rwxr-xr-x | run_case_study_dag.py | 2 |
3 files changed, 33 insertions, 16 deletions
| @@ -1 +1,10 @@ | |||
| 1 | 0, localization_qcif, loc001, 100, 15, loc, 1, 50, 1, 0, 50, 50 \ No newline at end of file | 1 | 0, texture_synthesis_qcif, texture_synthesis_qcif__A, 50, 1, 300, 1, 123, 1, 0, 6, 6 |
| 2 | 0, disparity_qcif, disparity_qcif__B, 50, 1, 305, 1, 123, 1, 6, 19, 19 | ||
| 3 | 0, mser_qcif, mser_qcif__C, 50, 1, 306, 1, 123, 1, 24, 7, 7 | ||
| 4 | 0, localization_qcif, localization_qcif__D, 50, 1, 307, 1, 123, 1, 31, 34, 34 | ||
| 5 | 0, sift_qcif, sift_qcif__E, 50, 1, 308, 1, 123, 1, 64, 54, 54 | ||
| 6 | 0, texture_synthesis_qcif, texture_synthesis_qcif__J, 50, 1, 309, 1, 123, 1, 117, 6, 6 | ||
| 7 | 0, stitch_qcif, stitch_qcif__F, 50, 2, 301, 1, 123, 1, 6, 27, 27 | ||
| 8 | 0, tracking_qcif, tracking_qcif__G, 50, 2, 302, 1, 123, 1, 32, 9, 9 | ||
| 9 | 0, svm_qcif, svm_qcif__H, 50, 2, 303, 1, 123, 1, 41, 38, 38 | ||
| 10 | 0, stitch_qcif, stitch_qcif__I, 50, 2, 304, 1, 123, 1, 79, 27, 27 \ No newline at end of file | ||
| @@ -403,12 +403,12 @@ static void _rt_write_to_file() { | |||
| 403 | } | 403 | } |
| 404 | fclose(fp); | 404 | fclose(fp); |
| 405 | out: | 405 | out: |
| 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 |
| 429 | static void _rt_start_loop() { | 429 | static 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() { | |||
| 479 | static void _rt_stop_loop() { | 480 | static 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 |
