From ee94a849ecb331d3d506dbd7467f01f79263bf17 Mon Sep 17 00:00:00 2001
From: Martina Maggio <maggio.martina@gmail.com>
Date: Tue, 9 Apr 2019 20:43:09 +0200
Subject: [PATCH] adding readme

---
 artifact/README | 186 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 186 insertions(+)
 create mode 100644 artifact/README

diff --git a/artifact/README b/artifact/README
new file mode 100644
index 0000000..7b0f5ee
--- /dev/null
+++ b/artifact/README
@@ -0,0 +1,186 @@
+
+------------------------------------------------------------------
+*** GENERAL INFORMATION ***
+------------------------------------------------------------------
+
+This artifact complements the paper
+
+  DMAC: Deadline-Miss-Aware Control
+  P. Pazzaglia, C. Mandrioli, M. Maggio, and A. Cervin
+  Euromicro Conference on Real-Time Systems (ECRTS), 2019
+
+The paper describes a synthesis technique for controllers that are
+aware of deadline misses and can use three different strategies to
+handle the misses: kill the job, let the job continue and skip the
+next, let the job continue and queue the next using a queue of
+maximum size 1 that contains the freshest job.
+
+The code reproduces figures 7, 8, and 9 from the paper.
+
+------------------------------------------------------------------
+*** EXECUTION INSTRUCTIONS ***
+------------------------------------------------------------------
+
+Requirements for the code execution:
+
+  * The code is better run in a Unix platform. Specifically, the code
+    has been tested on both Linux (Fedora 25) and MAC OS X. It is
+    possible to run the code on Windows machines, but not following
+    these instructions (automation via shell scripting does not work).
+  
+  * The code requires: a C++ compiler, MATLAB, and a bash shell. The
+    code has been tested with clang++ on Mac OS and g++ on Linux and
+    with different versions of MATLAB (from R2012 to R2016a).
+    Finally, the code requires a full version of latex installed for
+    the generation of the figures (that uses tikz and pgfplots).
+  
+The artifact has the following folder structure:
+
+  | - figures
+  |   | - fig7.tex
+  |   | - fig8.tex
+  |   | - fig9.tex    
+  | - src
+  |   | - matlab
+  |   |   | - ...
+  |   | - scenario
+  |   |   | - ...
+  |   | - sim
+  |   |   | - ...
+  | - tasksets
+  |   | - ...
+  | generate_results.sh
+  | process_results.sh
+  | plot_results.sh
+
+  The folder tasksets contains many tasksets that can be tested. In
+  the figures shown in the paper we use 7 of these tasksets:
+    n5_u70taskset_25.csv,
+    n5_u70taskset_100.csv,
+    n5_u80taskset_25.csv,
+    n10_u70taskset_25.csv,
+    n10_u70taskset_100.csv,
+    n20_u70taskset_25.csv,
+    n20_u70taskset_100.csv.
+  The other files are given in case the reviewer wants to experiment
+  with different values (this requires modifications of the scripts).
+  
+  The folder figures contains the latex sources for the figures.
+  
+  The folder src contains the source code.
+  
+  Finally, there are three scripts in the main folder:
+  generate_results.sh, process_results.sh, and plot_results.sh.
+
+To run the code for the artifact four steps are required:
+
+  1) Modify the MATLAB path folder in process_results.sh to point to
+     the folder where MATLAB is installed. Two examples are given for
+     standard Linux and MAC OS X installations.
+
+     MATLABPATH="/usr/local"
+     MATLABPATH="/Applications/MATLAB_R2017a.app"
+
+  2) Open a terminal and run the script to generate the result files
+     with the following command:
+     
+       chmod a+x generate_results.sh && ./generate_results.sh
+       
+     NOTE: this command will take quite a long time to execute.
+     On an machine with 8 cores this command ran for >48 hours.
+     
+     Running this script performs the following operations:
+     
+       - runs the scenario theory C program to determine the
+         number of experiments to perform
+       - runs the C++ simulator to produce the data (this step is
+         parallelized, 7 processes called "simulator" are launched),
+         they write files in the "results" folder that is created by
+         the script
+         
+     The output shown at the command line should resemble this:
+     
+     ************************************************************
+     ~$ ./generate_results.sh
+
+      ------------------------------------------------
+      Scenario Theory:
+      ------------------------------------------------
+        epsilon                    = 0.003000
+        beta                       = 0.010000
+        experiments                = 1533
+      ------------------------------------------------
+      Simulator:
+      ------------------------------------------------
+        num_tests                  = 1533
+        num_jobs                   = 500
+        number of time steps       = 15
+        num samples execution time = 5
+        skew factor                = 0.75
+      - launched result generation for n5_u70taskset_25.csv
+      - launched result generation for n10_u70taskset_25.csv
+      - launched result generation for n20_u70taskset_25.csv
+      - launched result generation for n20_u70taskset_100.csv
+      - launched result generation for n5_u80taskset_25.csv
+      - launched result generation for n10_u70taskset_100.csv
+      - launched result generation for n5_u70taskset_100.csv
+      ------------------------------------------------
+      data generation terminated
+      ------------------------------------------------ 
+     
+     ************************************************************
+         
+  3) Once step 2 is completed run the script to process the data,
+     generate the controller and perform the control analysis, with
+     the following command:
+     
+       chmod a+x process_results.sh && ./process_results.sh
+       
+     NOTE: this command will take some time to execute.
+     On an machine with 8 cores this command ran for >8 hours.
+     
+     Running this script runs the MATLAB program that processes the
+     data (in a parallelized form). The output shown at the command
+     line should resemble this:
+     
+     ************************************************************
+     
+      ------------------------------------------------
+      Matlab wrote results for n10_u70_f100
+      Matlab wrote results for n10_u70_f25
+      Matlab wrote results for n20_u70_f100
+      Matlab wrote results for n20_u70_f25
+      Matlab wrote results for n5_u70_f100
+      Matlab wrote results for n5_u70_f25
+      Matlab wrote results for n5_u80_f25
+      ------------------------------------------------
+      data processing terminated
+      ------------------------------------------------
+     
+     ************************************************************     
+
+  4) Once step 3 is completed run the script to generate the figures
+     for the paper using the following command: 
+
+       chmod a+x plot_results.sh && ./plot_results.sh
+   
+     This command uses the results saved in the result folder to plot
+     the figures that are shown in the paper. In particular, the
+     script generates three files {fig7.pdf, fig8.pdf, fig9.pdf} that
+     correspond to the paper figures.
+     
+     Due to randomness (in the sequence generation), the figures may
+     differ from the paper ones, but the trends should be the same
+     and the plots should generally be similar.
+
+-----
+NOTE:
+-----
+
+  It is possible to bypass step 1, 2 and 3, downloading the zip files
+  that contains the result files from the following link:
+  
+  http://XXX
+  
+  Once downloaded, unzip the file in the artifact folder and
+  follow (only) step 4.
-- 
GitLab