From 30a82090ec1fe3292881da931a320ea3a168cfba Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Mon, 8 Mar 2021 18:25:55 -0500 Subject: Case Study: Add unified runner script `rtas21-ae-case-study.sh` --- rtas21-ae-case-study.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 rtas21-ae-case-study.sh (limited to 'rtas21-ae-case-study.sh') 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 @@ +#!/bin/bash +# Copyright 2021 Joshua Bakita +# Developed to run the case study as documented in the RTAS'21 paper, +# "Simultaneous Multithreading in Real-Time Mixed-Criticality Systems" + +if [[ "$EUID" != 0 ]]; then + echo "You need to be root to run realtime tasks with LITMUS-RT!" + exit +fi + +# Parameter validation +if [ $# -lt 1 ]; then + taskset_root=ABmod_light_TACLe-SDVBS_5.5 + num_studies=10 + echo "Using default case-study task sets from '$taskset_root'." + echo "To use another set, pass the path as the first param and the number of sets as the second." +else + if [ $# -lt 2 ]; then + echo "Number of tasksets not specified!" + echo "Usage: $0 " + exit + fi + taskset_root=$1 + num_studies=$2 + if [[ ! -d "$taskset_root" ]]; then + echo "Path '$taskset_root' not found." + echo "Usage: $0 " + exit + else + echo "Using case-study task sets from '$taskset_root'." + fi +fi + +# Run studies +for (( i = 1; i <= $num_studies; i++ )); do + echo "Starting case study for taskset $i" + ./run_case_study.py $taskset_root/$i/ & + sleep 600 + echo "Releasing taskset $i" + /playpen/mc2/liblitmus/release_ts + sleep 3600 + echo "Killing taskset $i" + kill $(cat pids.txt) + sleep 600 +done -- cgit v1.2.2