#!/bin/bash # run this with sudo casestudies=("12" "20" "21" "30" "31" "32") #("10" "11" "12" "20" "21" "30" "31" "32") # for 1.5 inflation: periods=(129 69 90 126 164 189) #(86 104 129 69 90 126 164 189) #ms # for 1.1 inflation: # periods=(63 76 95 51 67 93 121 140) iterations=10000 iteration_safety_margin=20 safety_wait_secs=5 sudo /home/ae/liblitmus/setsched P-FP sudo /home/ae/liblitmus/showsched if ! cat /proc/litmus/stats | grep -q 'real-time tasks = 0'; then echo "ERROR: NOT ALL TASKS OUT OF SYSTEM." fi for i in ${!casestudies[@]}; do echo "------RELEASING sched-${casestudies[i]}------" stderr_name=deadline_misses_sched-${casestudies[i]}_${iterations} echo "stderr file goes to ${stderr_name}" sudo python3 run_case_study_dag.py sched-${casestudies[i]} 1 ${stderr_name} sleep $safety_wait_secs sudo /home/ae/liblitmus/release_ts if cat /proc/litmus/stats | grep -q 'real-time tasks = 0'; then echo "ERROR: problem releasing tasks." fi sleep_dur=$(( ($iterations+$iteration_safety_margin)*${periods[i]}/1000+$safety_wait_secs )) echo "sleeping for $sleep_dur s..." sleep $sleep_dur while ! cat /proc/litmus/stats | grep -q 'real-time tasks = 0'; do sleep_dur=$(( ($iteration_safety_margin)*${periods[i]}/1000+$safety_wait_secs )) echo "sleeping for $sleep_dur s..." sleep $sleep_dur done if cat ${stderr_name} | grep -q 'tardy'; then echo "**********************DEADLINE MISS**********************" fi done echo "printing deadline misses:" cat ${stderr_name} echo "-------------------------"