denishoornaert / real-time-task-generators

A collection of some taskset generators for real-time systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Real-time Taskset Generator

A collection of some taskset generators for real-time systems

Gitter

DependenciesUsageFeaturesLimitationsLicense

NOTICE: THIS PROGRAM IS UNDER DEVELOPMENT...

📦 Required Packages

Assuming that Python (version 3) is installed in the targeted machine, to install the required packages:

pip install docopt scipy numpy csv graphviz

or

python -m pip install docopt scipy numpy csv graphviz

⚙️ Usage

Task generator:

The options of the taskset generator are as follows (python ./task_generator.py -h):

Usage:
    task_generator                [options]

Options:
    --round, -r                round the numbers [default: False]
    --utilization=N, -u N      system utilization in percent  [default: 50]
    --generator=N, -g N        task generation algorithm (0: WATERS 1: UUniFast 2: Emberson 3:WATERS (fixed-sum))  [default: 1]
    --mapping=N, -m N          the mapping algorithm of taskset (0: No mapping 1: Worst-fit 2: First-fit) [default: 0]
    --ntask=N, -n N            number of tasks in one taskset  [default: 15]
    --nset=N, -s N             number of tasksets to generate  [default: 1]
    --npe=N, -p N              number of processing elements  [default: 4]
    --version, -v              show version and exit
    --help, -h                 show this message

To test the tool and run the taskset generator with the default options:

$ python ./task_generator.py

Jobset generator:

In order to generate a jobset with specific job-level fixed priority policy from a taskset, you can use the ./priority_generator.py. The options of the jobset generator are as follows (./priority_generator.py -h):

Usage:
    priority_generator               [-t FILE] [options]

Options:
    --taskset FILE, -t FILE          taskset csv file [default: taskset-0.csv]
    --method=N, -m N                 priority assigning method (0: Rate-monotonic,1: Deadline-monotonic,2: Earliest deadline first (EDF)) [default: 0]
    --sag, -s                        generate with SAG format
    --version, -v                    show version and exit
    --help, -h                       show this message

Group generator:

In order to generate a group of tasksets and their jobsets, you can use the ./group_generator bash script. The options of the group taskset generator are as follows (./group_generator -h):

Usage:
      group_generator.sh  [-argument value]...

Options:
    -s N      number of tasksets to generate  [default: 1]
    -n N      number of tasks in each taskset  [default: 10]
    -u N      system utilization in percent  [default: 50]
    -g N      task generation algorithm (0: WATERS 1: UUniFast 2: Emberson 3: WATERS (fixed-sum))  [default: 1]
    -p N      priority assigning method (0: Rate-monotonic 1: Deadline-monotonic 2: Earliest deadline first (EDF)) [default: 0]
    -c N      number of cores [default: 4]
    -v        show version and exit
    -h        show this message

Directed acyclic graph (DAG) generator:

The options of the DAG generator are as follows (python ./dag_generator.py -h):

Usage:
    dag_generator               [-t FILE] [options]

Options:
    --taskset FILE, -t FILE          taskset csv file [default: taskset-0.csv]
    --root=N, -r N                   number of root node in graph [default: 5]
    --branch=N, -b N                 branch factor of a node (maximum number of children) [default: 4]
    --depth=N, -d N                  maximum depth of graph [default: 8]
    --version, -v                    show version and exit
    --help, -h                       show this message

Assuming that the taskset generated by ./task_generator.py is named taskset-0.csv and present in the current directory, to test the DAG generator with the default options:

$ python ./dag_generator.py

⚠️ NOTE: This DAG generator does not produce fork-join graphs.

Output format:

The DAG generator tool works with standard XML format (Example). Each XML file contains the following information:

  • Task specification:
    • Task name (should start with "T")
    • Best-case execution time (BCET)
    • Worse-case execution time (WCET)
    • Period
    • Deadline
    • Mapped processing element (PE)
  • Edge specification
    • Source task
    • Edge name
    • Destination task

🔧 Features

1: Some part of the code adapted from "Timing Analysis of Asynchronized Distributed Cause-Effect Chains" paper implementation

2: Some part of the code adapted from here

🚧 Limitations

  • For now, the generators just support the discrete-time model and all the numbers are integer.

🌱 Contribution

With your feedback and conversation, you can assist me in developing this application.

  • Open pull request with improvements
  • Discuss feedbacks and bugs in issues

📜 License

Copyright © 2021 Pourya Gohari

This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details

About

A collection of some taskset generators for real-time systems

License:Apache License 2.0


Languages

Language:C++ 82.6%Language:Python 15.6%Language:Shell 1.5%Language:CMake 0.3%