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
  2. How to compile and run the experiments
  3. Running a single experiment
  4. Overview of the code structure

Please follow the instructions detailed in each section. In case of problems or further questions, feel free to contact us by email.

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 can be downloaded as a tgz archive: http://retis.santannapisa.it/~luca/RTNS17/rtns-artifact-abeni.tgz.
The artifact has the following package dependencies:

On Debian, the dependencies can be installed with

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

Once downloaded, decompress the ArtifactEvaluation folder:

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:

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)
generate.sh Script to drive taskgen.py
datastat.cpp Statistic program to compute averages, standard deviations, etc…
dgen.cc Program to transform an implicit deadline taskset in a constrained deadline taskset as described in the paper
schedcheck.cc Program to check the schedulability of a constrained deadline taskset
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
N Number of tasks per taskset
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
srv-taskset.cc Main simulator program
Sim/*.cc/hh Generic classes used to build an event-based simulator
Sim/CPU Directory containing the classes implementing the real-time tasks, kernels, schedulers, and servers
Sim/CPU/server.cc/hh Generic aperiodic server
Sim/CPU/budget_server.cc/hh Aperiodic server with budget (derives from the Server class)
Sim/CPU/cbserver.cc/hh Implementation of the original Constant Bandwidth Server
Sim/CPU/hcbserver.cc/hh Implementation of the Hard Constant Bandwidth Server
Sim/CPU/hcbserver2.cc/hh Implementation of H-CBS^D as described in the paper
Sim/CPU/hcbserver2r.cc/hh Implementation of H-CBS^D-R as described in the paper
Sim/CPU/hcbserver-so.cc/hh Implementation of H-CBS^D-W as described in the paper
Sim/CPU/prioritykernel.cc/hh Fixed or dynamic priority scheduler (used to schedule the servers)
Sim/CPU/task.cc/hh Real-Time tasks
Sim/CPU/taskset.cc/hh Taskset class (used to read taskset descriptions from text files and to instatiate the appropriate tasks)