Implementations

Analysis Framework of Probabilistic Real Time Systems (MATLAB scripts)

Here are some MATLAB scripts implementing a framework for analyzing probabilistic real time systems. The framework can handle any and all combinations of probabilistic and deterministic parameters of tasks, be it:

  • Probabilistic Execution Time and Probabilistic Inter-Arrival Time (and, implicitly probabilistic Deadline)
  • Probabilistic Execution Time and Deterministic Inter-Arrival Time
  • Deterministic Execution Time and Probabilistic Inter-Arrival Time (and, implicitly probabilistic Deadline)
  • Deterministic Execution Time and Deterministic Inter-Arrival Time, i.e. the “classical” worst case analysis.

Also, for the probabilistic analysis, the Uniform Re-sampling strategy is implemented for both Execution Time distributions and Inter-Arrival Time distributions.

Click here to download an archive with all the scripts. In order to run the analysis, there are several files that you can execute, depending on what you are interested in. Below is a list of some of the main files and a short description of each:

generateRandomTaskSetFunction.m

  • usage: taskSet = generateRandomTaskSetFunction(nbTasks, nbValues, scale)
  • generates a task set with has a number of tasks equal to nbTasks, nbValues values for each random variable and the values randomly chosen in the interval [1, scale]. If nbValues is 1, then the task set is deterministic.

 

probabilisticWorstCaseResponseTime.m

  • usage: respTimeDistrib = probabilisticWorstCaseResponseTime(taskSet, nbOfPeriods)
  • computes the response time distribution of the least prioritary task in a given taskset. The study interval is given as a multiple of the largest arrival time values of the least prioritary task. If nbOfPeriods is equal to 1, then the analysis is performed up to the deadline of the task.
  • E.T. re-sampling and M.I.T. re-sampling can be activated in this script.

 

scriptSimulations.m

  • usage: just run it in MATLAB, it will do the rest
  • it is a simulation script that generates and simulates tasks sets in order to determine the average analysis duration, building a matrix of results, varying the number pf tasks per task set on one side, and the number of values per random variable on the other side.
  • The number of tasks and number of values vary from “inceput” to “sfarsit” (defaults 2 and 10 respectively), and the number of tasks over which the average is computed is given by “numarSimulari” (default 20).
  • If you want to enable any kind of re-sampling, you need to activate it in probabilisticWorstCaseResponseTime.m

The rest of the scripts are commented and not hard to understand if you are interested in knowing what they do and how they work. If you need more details or you have troubles running the scripts or you found a bug or you have an idea of improvement, please contact me.