# RTNS 2017 Artifact Evaluation

This document explains how to reproduce the experiments discussed in the paper

Daniel Casini, Luca Abeni, Alessandro Biondi, Tommaso Cucinotta and Giorgio Buttazzo, “Constant Bandwidth Servers with Constrained Deadlines”, In Proceedings of the 25th International Conference on Real-Time Networks and Systems (RTNS 2017), Grenoble, France, October 4-6, 2017.

The document is organized as follows:

## 1. Environment setup

The artifact has been developed on Linux-based OSs, has been tested on various versions of Debian, Ubuntu and Fedora and should be able to run on every modern Linux distribution (provided that the dependencies listed below are installed).
The artifact has the following package dependencies:

• A C++ compiler (g++ has been tested, but c++lang is OK too)
• GNU make
• Python 2
• numpy
• gnuplot

On Debian, the dependencies can be installed with

apt-get install g++ make python python-numpy gnuplot-nox


tar xvzf rtns-artifact-abeni.tgz


## 2. How to compile and run the experiments

Open a terminal, and enter the ArtifactEvaluation folder by typing

 cd ArtifactEvaluation
where ArtifactEvaluation is the path where you decompressed the content of the rtns-artifact-abeni.tgz tgz archive.

The folder contains two sub-folders, RTNS-Exps and Simulator:

• RTNS-Exps contains several .sh files which are used to generate the experiment plots and the task-set generator (taskgen.py, based on Emberson et al. task set generator).
• Simulator, which contains the files related to the C++ simulator which is used to generate the charts. The source code of the Simulator is in the Sim sub-folder.

To run the experiments, it is sufficient to run the command:

make


from the root of the artifact evaluation folder.

At the end of the script execution, the plots are automatically generated using gnuplot.
The plots can be found as pdf file in RTNS-Exps/Figure<i> where <i> is the index of the corresponding figure in the paper.

WARNING: The script launches the experiments with the same number of iterations as discussed in the paper (i.e., 100 task sets for each point of each chart). However, under this configuration, the experiments will take quite some time (on a fast Intel Core i7 - with 4 cores + hyperthreading - it takes about 1 day per figure).

To speed up the simulations, it is possible to reduce the number of tasksets simulated for each point of the figures, by setting the “S” environment variable. For example,

export S=5


sets the number of task sets per point to 5.

In this manner, the makefile will run the same experiments with a lower number of iterations (less samples), requiring a running-time in the order of minutes.
Note that, if the command export S=5 is used, the experimental results may differ from the one in the paper due to higher sampling noise - larger confidence intervals.

All the generated data can be removed by using the “data-clean” Makefile target:

make data-clean


WARNING: this will destroy all the data generated during the (possibly very long) simulations.

## 3. Running a single experiment

Each plot can also be individually generated by executing the command:

make figure<i>


where <i> is the index of the corresponding figure in the paper.

## 4. Overview of the Code Structure

The following scripts and programs can be found in the RTNS-Exp directory are used to generate the experimental setups and to drive the simulator:

File Description
taskgen.py Emberson’s taskset generator (modified to allow setting the random seed, to achieve reproducible simulations)
datastat.cpp Statistic program to compute averages, standard deviations, etc…
simulate.sh Script to drive the real-time scheduling simulator
compute.sh Script to collect the data generated by simulate.sh
run.sh Script used to invoke generate.sh and simulate.sh

The simulations needed to generate a figure are started by “run.sh”, that tries to use all the available CPUs / CPU cores. The script (using bash) must be invoked from a directory containing a file named “runcommon.sh”, where the most important simulation’s parameters are set:

Variable Description
S Number of tasksets per point
UTILS Set of CPU utilizations for the tasksets to be simulated
ALPHAS As described in the paper
CRS As described in the paper
SZS As described in the paper

Look at the “runcommon.sh” files contained in the various “Figure?” directories for more details.

The real-time scheduling simulator is stored in the “Simulator” directory. In most of the cases, a .cc file has an associate .hh file describing its software interface, and there is a 1<->1 relationship between files and C++ classes (a C++ class per .cc file). Without entering in the details, the most important source files are:

File Description