Task-Set Generator
In this manual the installation process and usage of the task-set generator is elaborated. The task set-generator is part of the COde Behaviour fRAmework (COBRA). This task-set generator provides input for several sub systems of the framework. Thereby it is important to have the possibility to create specific tasks according to the user's needs. The documents explain which prerequisites are necessary to be able to use the task set-generator step by step. After everything is set, the usage of each part (executable jar file) of the task-set generator is given. This documents is focussed on the installation and usage of the task set-generator, for details on how the task set-generator works, I refer you the paper about the task set-generator: http://ceur-ws.org/Vol-1697/EWiLi16_6.pdf.
Prerequisites
Before the task set-generator can be used, a set of software packages are required. The installation commands are for the Linux operation systems.
- Java JDK x64 1.7 or higher
- GCC or other C compiler
- Additional packages
sudo apt-get install swig maven svn
- Download the current version of GLPK source
- Unzip the archive
- Configure
- Make and install GLPK
- Test the installation
wget ftp://ftp.gnu.org/gnu/glpk/glpk-4.60.tar.gz
tar -xzf glpk-4.60.tar.gz
cd glpk-4.60
./configure
make
make check
sudo make install
sudo ldconfig
glpsol --version
- Download the source package from sourceforce
- Unzip the archive
- Configure
- Make and install the library
tar -xzf libglpk-java-1.7.0.tar.gz
cd libglpk-java-1.7.0
./configure
make
make check
sudo make install
sudo ldconfig
Task-Set Generator
The task set-generator can be downloaded from this location. It contains three executable JAR files, an example configuration file and this manual. Because of the portability of JAR files nothing needs to be installed beside the prerequisites. To generate the executable tasks, three JAR files must be executed. Use the following commands to generate the task sets:
java -jar SetGenerator.jar user.xml
java -Djava.library.path=/usr/local/lib/jni/ \
-classpath /usr/share/java/glpk-java.jar \
-jar TaskCreator.jar user.xml
java -jar ExecutableTaskGenerator.jar user.xml
In the Figure below the functionality of each JAR file is displayed briefly. The first JAR file generates the synthetic task set with their tasks, the second JAR file calculates for each task the benchmark program sequence, and the last JAR file creates the source code for each tasks and the for each task set a Makefile to compile the tasks. Below more details are given about the usage of each JAR file.
Configuration file: user.xml
The file user.xml is the configuration file to generate task sets according to the users needs. This allows the user to tweak each parameter separately to create their own kind of tasks and task sets. Each of the three JAR files uses different parameters of this configuration file. Important, there must be always a configuration file present for the java programs. When no argument is given, the program will search for user.xml in the same directory of the JAR file. To use a configuration file in the task set generator, add the path and file name as argument with all three JAR files.
Table 1 describes each parameter of the configuration file.
Parameter | Description |
---|---|
Synthetic task-set parameters |
|
name | The name of the file (Step 1) and directory (Step 2) of the task sets |
tasksetlocation | The location where the task sets will be saved on the disk |
globalUtilizationMin | The lower bound of the utilization range |
globalUtilizationMax | The upper bound of the utilization range |
utilizationStep | The difference between two consecutive utilizations |
numberOfTasks | The number of tasks in each task set |
numberOfTaskSets | The number of task sets generated per utilization |
periodMin | The minimum period which is used for a task |
periodMax | The maximum period which is used for a task |
periodStep | The level of granularity of the generated period |
seed | The seed for the pseudorandom generator |
Target Hardware information |
|
architecture | The architecture of the processor |
CPUSpeedMHz | The clock frequency of the processor |
cores | The number of cores of the processor |
cCompiler | The c code compiler to create the executables |
cflagsTasks | The flags for the compiler for compiling the tasks |
cflagsBenchmarkPrograms | The flags for the compiler for compiling the benchmark programs |
executablePrefix | The prefix of the executable name (the number will be added automatically) |
Benchmark Suite Information |
|
location | The location of the benchmark suite and description files |
The TacleBench benchmark suite
The task set-generator uses the TACLeBench benchmark suite as input to create executable tasks. To be able to use a benchmark program in a task, two conditions must be fulfilled: 1) there must a description of the benchmark program in the benchmark description files directory, and 2) the execution cycles of the benchmark program for the target hardware architecture must be added to the description file. The location of the description files directory must be in the root folder of the benchmark program suite directory, the location of the root folder of the benchmark program suite directory can be changed in the configuration file). The benchmark programs consists of a number of source files and/or header files written in C source code. There are no architecture specific header files (except the PapaBench benchmark program), which means that each benchmark program can be compiled and executed on every target hardware. At this moment 10 benchmark programs are available with timing information for the x86 architecture. These can be download from HERE. More information about the TACLe project and TACLe benchmark suite can be found on the TACLe website and can be downloaded from the Github repository.
Usage of each executable JAR files
This section will explain the functionality of each JAR files of the task set-generator. The first JAR file, SetGenerator.jar, will generate the synthetic task sets depending on the given parameters in the configuration file. This JAR file produces one XML file including all generated task sets, The Figure below is an example of such a task set. These task sets are used for formal and simulation-based analysis, because these levels of analysis only need the task model with it’s parameters.
The second JAR file, TaskCreator.jar, calculates for each task the combination of benchmark programs using the GLPK package as ILP solver.
To use the GLPK solver in Java, two options must be added to the command to execute the JAR file. First, the GLPK functions are used in the JAR file,
so a classpath must be provided to this Java library (glpk-java.jar). The second option is the path the JNI library of GLPK to call the GLPK functions
for Java source code. After executing the JAR file, an output directory is created named the name given in the configuration file. The directory contains
The third JAR file, ExecutableGenerator.jar, will create per task a C source file, where the selected benchmark programs main functions are called. Using a template file, additional code can be added at the beginning and ending of the code, and between different benchmark programs. In the Figure below a simple example is given of a template. Beside the task created by the program, for each task set a Makefile is generated to compile the tasks for the target hardware. By executing the command make in the directory of a specific task set, all the tasks will be compiled. To compile all the task sets with one command, enter the make command for the Makefile in the directory where all task sets are located.