Commit 516a7b63 by Maxime Chéramy

Fix use of SchedulerInfo.

parent c946f186
......@@ -130,7 +130,7 @@ Then the Scheduler can be initialized like this::
class P_EDF(PartitionedScheduler):
def init(self):
PartitionedScheduler.init(self, SchedulerInfo("EDF_mono", EDF_mono))
PartitionedScheduler.init(self, SchedulerInfo("simso.schedulers.EDF_mono"))
Defining the packing
......@@ -170,7 +170,7 @@ Complete source code::
class P_EDF(PartitionedScheduler):
def init(self):
PartitionedScheduler.init(self, SchedulerInfo("EDF_mono", EDF_mono))
PartitionedScheduler.init(self, SchedulerInfo("simso.schedulers.EDF_mono"))
def packer(self):
# First Fit
......
......@@ -87,6 +87,10 @@
<dt><a href="modules.html#simso.core.Job.Job.activation_date">activation_date (Job attribute)</a>
</dt>
<dt><a href="modules.html#simso.core.Job.Job.actual_computation_time">actual_computation_time (Job attribute)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
......@@ -142,16 +146,24 @@
</dt>
<dt><a href="modules.html#simso.configuration.Configuration.Configuration">Configuration (class in simso.configuration.Configuration)</a>
<dt><a href="modules.html#simso.core.Job.Job.computation_time">computation_time (Job attribute)</a>
</dt>
<dt><a href="modules.html#simso.core.Job.Job.cpu">cpu (Job attribute)</a>
<dt><a href="modules.html#simso.core.Job.Job.computation_time_cycles">computation_time_cycles (Job attribute)</a>
</dt>
<dt><a href="modules.html#simso.configuration.Configuration.Configuration">Configuration (class in simso.configuration.Configuration)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="modules.html#simso.core.Job.Job.cpu">cpu (Job attribute)</a>
</dt>
<dt><a href="modules.html#simso.core.Task.GenericTask.create_job">create_job() (GenericTask method)</a>
</dt>
......@@ -378,16 +390,20 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="modules.html#simso.core.Logger.Logger.log">log() (Logger method)</a>
<dt><a href="modules.html#simso.core.Job.Job.laxity">laxity (Job attribute)</a>
</dt>
<dt><a href="modules.html#simso.core.Logger.Logger">Logger (class in simso.core.Logger)</a>
<dt><a href="modules.html#simso.core.Logger.Logger.log">log() (Logger method)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="modules.html#simso.core.Logger.Logger">Logger (class in simso.core.Logger)</a>
</dt>
<dt><a href="modules.html#simso.core.Logger.Logger.logs">logs (Logger attribute)</a>
</dt>
......
......@@ -485,6 +485,13 @@ date + the relative deadline.</p>
</dd></dl>
<dl class="attribute">
<dt id="simso.core.Job.Job.actual_computation_time">
<tt class="descname">actual_computation_time</tt><a class="headerlink" href="#simso.core.Job.Job.actual_computation_time" title="Permalink to this definition"></a></dt>
<dd><p>Computation time in ms as if the processor speed was 1.0 during the
whole execution.</p>
</dd></dl>
<dl class="attribute">
<dt id="simso.core.Job.Job.actual_computation_time_cycles">
<tt class="descname">actual_computation_time_cycles</tt><a class="headerlink" href="#simso.core.Job.Job.actual_computation_time_cycles" title="Permalink to this definition"></a></dt>
<dd><p>Computation time as if the processor speed was 1.0 during the whole
......@@ -492,6 +499,18 @@ execution.</p>
</dd></dl>
<dl class="attribute">
<dt id="simso.core.Job.Job.computation_time">
<tt class="descname">computation_time</tt><a class="headerlink" href="#simso.core.Job.Job.computation_time" title="Permalink to this definition"></a></dt>
<dd><p>Time spent executing the job in ms.</p>
</dd></dl>
<dl class="attribute">
<dt id="simso.core.Job.Job.computation_time_cycles">
<tt class="descname">computation_time_cycles</tt><a class="headerlink" href="#simso.core.Job.Job.computation_time_cycles" title="Permalink to this definition"></a></dt>
<dd><p>Time spent executing the job.</p>
</dd></dl>
<dl class="attribute">
<dt id="simso.core.Job.Job.cpu">
<tt class="descname">cpu</tt><a class="headerlink" href="#simso.core.Job.Job.cpu" title="Permalink to this definition"></a></dt>
<dd><p>The <a class="reference internal" href="#simso.core.Processor.Processor" title="simso.core.Processor.Processor"><tt class="xref py py-class docutils literal"><span class="pre">processor</span></tt></a> on which the
......@@ -547,6 +566,12 @@ Equivalent to <tt class="docutils literal"><span class="pre">self.cpu.running</s
</dd></dl>
<dl class="attribute">
<dt id="simso.core.Job.Job.laxity">
<tt class="descname">laxity</tt><a class="headerlink" href="#simso.core.Job.Job.laxity" title="Permalink to this definition"></a></dt>
<dd><p>Dynamic laxity of the job in ms.</p>
</dd></dl>
<dl class="attribute">
<dt id="simso.core.Job.Job.period">
<tt class="descname">period</tt><a class="headerlink" href="#simso.core.Job.Job.period" title="Permalink to this definition"></a></dt>
<dd><p>Period in milliseconds. Equivalent to <tt class="docutils literal"><span class="pre">self.task.period</span></tt>.</p>
......@@ -555,7 +580,7 @@ Equivalent to <tt class="docutils literal"><span class="pre">self.cpu.running</s
<dl class="attribute">
<dt id="simso.core.Job.Job.ret">
<tt class="descname">ret</tt><a class="headerlink" href="#simso.core.Job.Job.ret" title="Permalink to this definition"></a></dt>
<dd><p>Remaining execution time.</p>
<dd><p>Remaining execution time in ms.</p>
</dd></dl>
<dl class="attribute">
......@@ -859,7 +884,7 @@ processors.</p>
<dl class="method">
<dt id="simso.configuration.Configuration.Configuration.add_task">
<tt class="descname">add_task</tt><big>(</big><em>name</em>, <em>identifier</em>, <em>task_type='Periodic'</em>, <em>abort_on_miss=False</em>, <em>period=10</em>, <em>activation_date=0</em>, <em>n_instr=0</em>, <em>mix=0.5</em>, <em>stack_file=''</em>, <em>wcet=0</em>, <em>acet=0</em>, <em>et_stddev=0</em>, <em>deadline=10</em>, <em>base_cpi=1.0</em>, <em>followed_by=None</em>, <em>list_activation_dates=[]</em>, <em>preemption_cost=0</em>, <em>data=None</em><big>)</big><a class="headerlink" href="#simso.configuration.Configuration.Configuration.add_task" title="Permalink to this definition"></a></dt>
<tt class="descname">add_task</tt><big>(</big><em>name</em>, <em>identifier</em>, <em>task_type='Periodic'</em>, <em>abort_on_miss=True</em>, <em>period=10</em>, <em>activation_date=0</em>, <em>n_instr=0</em>, <em>mix=0.5</em>, <em>stack_file=''</em>, <em>wcet=0</em>, <em>acet=0</em>, <em>et_stddev=0</em>, <em>deadline=10</em>, <em>base_cpi=1.0</em>, <em>followed_by=None</em>, <em>list_activation_dates=[]</em>, <em>preemption_cost=0</em>, <em>data=None</em><big>)</big><a class="headerlink" href="#simso.configuration.Configuration.Configuration.add_task" title="Permalink to this definition"></a></dt>
<dd><p>Helper method to create a TaskInfo and add it to the list of tasks.</p>
</dd></dl>
......
No preview for this file type
......@@ -7,7 +7,8 @@ setup(
description='Simulation of Multiprocessor Real-Time Scheduling with Overheads',
author='Maxime Cheramy',
author_email='maxime.cheramy@laas.fr',
url='http://homepages.laas.fr/mcheramy/simso/',
url='http://projects.laas.fr/simso/',
download_url='https://github.com/MaximeCheramy/simso',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
......
__version__ = '0.8.1'
__version__ = '0.8.2'
......@@ -80,8 +80,7 @@ class EDHS(Scheduler):
cpus.append([cpu, Fraction(0)])
# Instantiate a scheduler.
sched = EDF_modified(self.sim, SchedulerInfo("EDF_modified",
EDF_modified))
sched = EDF_modified(self.sim, SchedulerInfo())
sched.add_processor(cpu)
sched.init()
......
......@@ -108,8 +108,7 @@ class EKG(Scheduler):
cpus = []
for i, cpu in enumerate(self.processors):
# Instantiate a scheduler.
sched = Modified_EDF(self.sim, SchedulerInfo("Modified_EDF",
Modified_EDF))
sched = Modified_EDF(self.sim, SchedulerInfo())
sched.add_processor(cpu)
sched.init()
......
......@@ -9,7 +9,7 @@ from simso.utils import PartitionedScheduler
class LB_P_EDF(PartitionedScheduler):
def init(self):
PartitionedScheduler.init(self, SchedulerInfo("EDF_mono", EDF_mono))
PartitionedScheduler.init(self, SchedulerInfo("simso.schedulers.EDF_mono"))
def packer(self):
# First Fit
......
......@@ -2,7 +2,6 @@
Partitionned EDF using PartitionedScheduler.
"""
from simso.core.Scheduler import SchedulerInfo
from simso.schedulers.EDF_mono import EDF_mono
from simso.utils import PartitionedScheduler
from simso.utils.PartitionedScheduler import decreasing_first_fit
......@@ -10,4 +9,4 @@ from simso.utils.PartitionedScheduler import decreasing_first_fit
class P_EDF(PartitionedScheduler):
def init(self):
PartitionedScheduler.init(
self, SchedulerInfo("EDF_mono", EDF_mono), decreasing_first_fit)
self, SchedulerInfo("simso.schedulers.EDF_mono"), decreasing_first_fit)
......@@ -21,7 +21,7 @@ class P_EDF2(Scheduler):
cpus.append([cpu, 0])
# Instantiate a scheduler.
sched = EDF_mono(self.sim, SchedulerInfo("EDF_mono", EDF_mono))
sched = EDF_mono(self.sim, SchedulerInfo("simso.schedulers.EDF_mono"))
sched.add_processor(cpu)
sched.init()
......
......@@ -10,4 +10,4 @@ from simso.utils.PartitionedScheduler import decreasing_worst_fit
class P_EDF_WF(PartitionedScheduler):
def init(self):
PartitionedScheduler.init(
self, SchedulerInfo("EDF_mono", EDF_mono), decreasing_worst_fit)
self, SchedulerInfo("simso.schedulers.EDF_mono"), decreasing_worst_fit)
......@@ -2,14 +2,13 @@
Partitionned EDF using PartitionedScheduler.
"""
from simso.core.Scheduler import SchedulerInfo
from simso.schedulers.RM_mono import RM_mono
from simso.utils import PartitionedScheduler
class P_RM(PartitionedScheduler):
def init(self):
PartitionedScheduler.init(
self, SchedulerInfo("RM_mono", RM_mono))
self, SchedulerInfo("simso.schedulers.RM_mono"))
def packer(self):
# First Fit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment