Schedulers Module¶
Authors: |
|
---|
Description¶
Local analysis functions (schedulers)
Computes the correlated event model from Lemma 2 in [Rox2010].
-
class
pycpa.schedulers.
RoundRobinScheduler
[source]¶ Round-Robin Scheduler
task.scheduling_parameter is the respective slot size
-
b_plus
(task, q, details=None, **kwargs)[source]¶ Maximum Busy-Time for q activations of a task.
This default implementation assumes that all other tasks disturb the task under consideration, which is the behavior of a “random priority preemptive” scheduler or a “least-remaining-load-last” scheduler. This is a conservative bound for all work-conserving schedulers.
Warning
This default implementation should be overridden for any scheduler.
Parameters: - task (model.Task) – the analyzed task
- q (boolean) – the number of activations
- details – reference to a dict of details on the busy window (instead of busy time)
Return type: integer (max. busy-time for q activations)
-
-
class
pycpa.schedulers.
SPNPScheduler
(priority_cmp=<function <lambda>>, ctx_switch_overhead=0, cycle_time=1e-09)[source]¶ Static-Priority-Non-Preemptive Scheduler
Priority is stored in task.scheduling_parameter, by default numerically lower numbers have a higher priority
Policy for equal priority is FCFS (i.e. max. interference).
-
class
pycpa.schedulers.
SPPScheduler
(priority_cmp=<function <lambda>>)[source]¶ Static-Priority-Preemptive Scheduler
Priority is stored in task.scheduling_parameter, by default numerically lower numbers have a higher priority
Policy for equal priority is FCFS (i.e. max. interference).
-
b_plus
(task, q, details=None, **kwargs)[source]¶ This corresponds to Theorem 1 in [Lehoczky1990] or Equation 2.3 in [Richter2005].
-
-
class
pycpa.schedulers.
SPPSchedulerActivationOffsets
(priority_cmp=<function <lambda>>)[source]¶ Static-Priority-Preemptive Scheduler which considers activation offsets assuming all tasks are activated synchronously with the given offsets/phases (phi).
- Assumptions:
- implicit or constrained deadlines
We exclude/shift interferers whose phase is larger than the task under analysis iff the interferers period is equal or smaller.
-
b_plus
(task, q, details=None, **kwargs)[source]¶ This corresponds to Theorem 1 in [Lehoczky1990] or Equation 2.3 in [Richter2005].
SPP scheduler with dmin correlation. Computes the approximate response time bound as presented in [Rox2010].
This corresponds to Theorem 1 in [Lehoczky1990] or Equation 2.3 in [Richter2005].
Implements Case 1 in [Rox2010].
Implements Case 2 in [Rox2010].
SPP scheduler with dmin correlation based on [Rox2010]. This is the exact version which performs an extensive search of busy window candidates.
This corresponds to Theorem 1 in [Lehoczky1990] or Equation 2.3 in [Richter2005].
-
class
pycpa.schedulers.
SPPSchedulerRoundRobin
(priority_cmp=<function <lambda>>)[source]¶ SPP scheduler with non-preemptive round-robin policy for equal priorities
-
b_plus
(task, q, details=None, **kwargs)[source]¶ This corresponds to Theorem 1 in [Lehoczky1990] or Equation 2.3 in [Richter2005].
-
-
class
pycpa.schedulers.
TDMAScheduler
[source]¶ TDMA scheduler task.scheduling_parameter is the slot size of the respective task
-
b_plus
(task, q, details=None, **kwargs)[source]¶ Maximum Busy-Time for q activations of a task.
This default implementation assumes that all other tasks disturb the task under consideration, which is the behavior of a “random priority preemptive” scheduler or a “least-remaining-load-last” scheduler. This is a conservative bound for all work-conserving schedulers.
Warning
This default implementation should be overridden for any scheduler.
Parameters: - task (model.Task) – the analyzed task
- q (boolean) – the number of activations
- details – reference to a dict of details on the busy window (instead of busy time)
Return type: integer (max. busy-time for q activations)
-