summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2021-03-08 18:25:55 -0500
committerJoshua Bakita <jbakita@cs.unc.edu>2021-03-08 18:25:55 -0500
commit30a82090ec1fe3292881da931a320ea3a168cfba (patch)
tree933832066bb7b4e2c78aeac2b9d35ad1105c5e26
parente159297cea19edf4fd6301f1129223133e10c5c5 (diff)
Case Study: Add unified runner script `rtas21-ae-case-study.sh`
-rwxr-xr-xrtas21-ae-case-study.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/rtas21-ae-case-study.sh b/rtas21-ae-case-study.sh
new file mode 100755
index 0000000..b066b6e
--- /dev/null
+++ b/rtas21-ae-case-study.sh
@@ -0,0 +1,45 @@
1#!/bin/bash
2# Copyright 2021 Joshua Bakita
3# Developed to run the case study as documented in the RTAS'21 paper,
4# "Simultaneous Multithreading in Real-Time Mixed-Criticality Systems"
5
6if [[ "$EUID" != 0 ]]; then
7 echo "You need to be root to run realtime tasks with LITMUS-RT!"
8 exit
9fi
10
11# Parameter validation
12if [ $# -lt 1 ]; then
13 taskset_root=ABmod_light_TACLe-SDVBS_5.5
14 num_studies=10
15 echo "Using default case-study task sets from '$taskset_root'."
16 echo "To use another set, pass the path as the first param and the number of sets as the second."
17else
18 if [ $# -lt 2 ]; then
19 echo "Number of tasksets not specified!"
20 echo "Usage: $0 <taskset root directory> <num tasksets>"
21 exit
22 fi
23 taskset_root=$1
24 num_studies=$2
25 if [[ ! -d "$taskset_root" ]]; then
26 echo "Path '$taskset_root' not found."
27 echo "Usage: $0 <taskset root directory> <num tasksets>"
28 exit
29 else
30 echo "Using case-study task sets from '$taskset_root'."
31 fi
32fi
33
34# Run studies
35for (( i = 1; i <= $num_studies; i++ )); do
36 echo "Starting case study for taskset $i"
37 ./run_case_study.py $taskset_root/$i/ &
38 sleep 600
39 echo "Releasing taskset $i"
40 /playpen/mc2/liblitmus/release_ts
41 sleep 3600
42 echo "Killing taskset $i"
43 kill $(cat pids.txt)
44 sleep 600
45done