Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
simso
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bfd65931
authored
Jul 01, 2015
by
Josué A
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the 'scheduler' decorator to all schedulers
parent
7fdd18fa
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
90 additions
and
36 deletions
+90
-36
simso/schedulers/BF.py
+2
-0
simso/schedulers/CC_EDF.py
+6
-1
simso/schedulers/DP_WRAP.py
+2
-1
simso/schedulers/EDCL.py
+2
-1
simso/schedulers/EDF.py
+2
-1
simso/schedulers/EDF2.py
+2
-1
simso/schedulers/EDF_US.py
+2
-1
simso/schedulers/EDF_mono.py
+2
-1
simso/schedulers/EDHS.py
+2
-1
simso/schedulers/EDZL.py
+2
-1
simso/schedulers/EKG.py
+6
-1
simso/schedulers/EPDF.py
+2
-1
simso/schedulers/ER_PD2.py
+2
-1
simso/schedulers/FP.py
+6
-1
simso/schedulers/Fixed_PEDF.py
+2
-1
simso/schedulers/G_FL.py
+2
-1
simso/schedulers/G_FL_ZL.py
+2
-1
simso/schedulers/LB_P_EDF.py
+2
-1
simso/schedulers/LLF.py
+2
-1
simso/schedulers/LLREF.py
+2
-1
simso/schedulers/LLREF2.py
+2
-1
simso/schedulers/LRE_TL.py
+2
-1
simso/schedulers/MLLF.py
+2
-1
simso/schedulers/NVNLF.py
+2
-1
simso/schedulers/PD2.py
+2
-1
simso/schedulers/P_EDF.py
+2
-1
simso/schedulers/P_EDF2.py
+2
-1
simso/schedulers/P_EDF_WF.py
+2
-1
simso/schedulers/P_RM.py
+2
-1
simso/schedulers/PriD.py
+2
-1
simso/schedulers/RM.py
+2
-1
simso/schedulers/RM_mono.py
+2
-1
simso/schedulers/RUN.py
+2
-1
simso/schedulers/Static_EDF.py
+6
-1
simso/schedulers/U_EDF.py
+2
-1
simso/schedulers/WC_RUN.py
+2
-1
simso/schedulers/WC_U_EDF.py
+2
-1
No files found.
simso/schedulers/BF.py
View file @
bfd65931
...
...
@@ -3,10 +3,12 @@ Implementation of the BF algorithm.
Authors: Maxime Cheramy and Stefan Junker
"""
from
simso.schedulers
import
scheduler
from
simso.core
import
Scheduler
,
Timer
from
fractions
import
Fraction
@scheduler
(
"simso.schedulers.BF"
)
class
BF
(
Scheduler
):
def
init
(
self
):
self
.
t_f
=
0
...
...
simso/schedulers/CC_EDF.py
View file @
bfd65931
...
...
@@ -2,8 +2,13 @@
Cycle-Conserving EDF. A DVFS variant of EDF (uniprocessor).
"""
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.CC_EDF"
,
required_proc_fields
=
[
{
'name'
:
'priority'
,
'type'
:
'float'
,
'default'
:
'1.0'
}
]
)
class
CC_EDF
(
Scheduler
):
def
init
(
self
):
self
.
ready_list
=
[]
...
...
simso/schedulers/DP_WRAP.py
View file @
bfd65931
...
...
@@ -4,8 +4,9 @@ Implementation of the DP-WRAP algorithm as presented by Levin et al. in
"""
from
simso.core
import
Scheduler
,
Timer
from
math
import
ceil
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.DP_WRAP"
)
class
DP_WRAP
(
Scheduler
):
def
init
(
self
):
self
.
t_f
=
0
...
...
simso/schedulers/EDCL.py
View file @
bfd65931
...
...
@@ -4,8 +4,9 @@ __author__ = 'Pierre-Emmanuel Hladik'
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.EDCL"
)
class
EDCL
(
Scheduler
):
"""
EDCL Scheduler.
...
...
simso/schedulers/EDF.py
View file @
bfd65931
...
...
@@ -3,8 +3,9 @@ Implementation of the Global-EDF (Earliest Deadline First) for multiprocessor
architectures.
"""
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.EDF"
)
class
EDF
(
Scheduler
):
"""Earliest Deadline First"""
def
on_activate
(
self
,
job
):
...
...
simso/schedulers/EDF2.py
View file @
bfd65931
...
...
@@ -3,8 +3,9 @@ Implementation of the Global-EDF (Earliest Deadline First) for multiprocessor
architectures (alternative implementation as the one provided by EDF.py).
"""
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.EDF2"
)
class
EDF2
(
Scheduler
):
"""Earliest Deadline First"""
def
init
(
self
):
...
...
simso/schedulers/EDF_US.py
View file @
bfd65931
...
...
@@ -2,8 +2,9 @@
Implementation of EDF-US[1/2].
"""
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.EDF_US"
)
class
EDF_US
(
Scheduler
):
def
init
(
self
):
self
.
ready_list
=
[]
...
...
simso/schedulers/EDF_mono.py
View file @
bfd65931
...
...
@@ -2,8 +2,9 @@
Earliest Deadline First algorithm for uniprocessor architectures.
"""
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.EDF_mono"
)
class
EDF_mono
(
Scheduler
):
def
init
(
self
):
self
.
ready_list
=
[]
...
...
simso/schedulers/EDHS.py
View file @
bfd65931
...
...
@@ -8,13 +8,13 @@ from simso.core import Scheduler, Timer
from
simso.core.Scheduler
import
SchedulerInfo
from
fractions
import
Fraction
from
math
import
ceil
from
simso.schedulers
import
scheduler
migrating_tasks
=
{}
# Mapping processor to scheduler.
map_cpu_sched
=
{}
class
EDF_modified
(
Scheduler
):
"""
An EDF mono-processor scheduler modified to accept migrating jobs.
...
...
@@ -69,6 +69,7 @@ class EDF_modified(Scheduler):
return
(
job
,
cpu
)
@scheduler
(
"simso.schedulers.EDHS"
)
class
EDHS
(
Scheduler
):
def
init
(
self
):
# Mapping task to scheduler.
...
...
simso/schedulers/EDZL.py
View file @
bfd65931
...
...
@@ -2,8 +2,9 @@
# coding=utf-8
from
simso.core
import
Scheduler
,
Timer
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.EDZL"
)
class
EDZL
(
Scheduler
):
"""
EDZL Scheduler. EDF Scheduler with zero laxity events.
...
...
simso/schedulers/EKG.py
View file @
bfd65931
...
...
@@ -2,6 +2,7 @@ from simso.core import Scheduler, Timer
from
simso.core.Scheduler
import
SchedulerInfo
from
fractions
import
Fraction
from
math
import
ceil
from
simso.schedulers
import
scheduler
class
Modified_EDF
(
Scheduler
):
...
...
@@ -85,7 +86,11 @@ class Group(object):
for
task
in
self
.
tasks
if
task
.
jobs
])
\
*
self
.
sim
.
cycles_per_ms
@scheduler
(
"simso.schedulers.EKG"
,
required_fields
=
[
{
'name'
:
'K'
,
'type'
:
'int'
,
'default'
:
'0'
}
]
)
class
EKG
(
Scheduler
):
def
init
(
self
):
self
.
groups
=
[]
...
...
simso/schedulers/EPDF.py
View file @
bfd65931
...
...
@@ -2,8 +2,9 @@
from
simso.core
import
Scheduler
,
Timer
from
math
import
ceil
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.EPDF"
)
class
EPDF
(
Scheduler
):
"""Earliest Pseudo-Deadline First"""
...
...
simso/schedulers/ER_PD2.py
View file @
bfd65931
...
...
@@ -2,6 +2,7 @@
from
simso.core
import
Scheduler
,
Timer
from
math
import
ceil
from
simso.schedulers
import
scheduler
def
rounded_wcet
(
job
,
q
=
None
):
...
...
@@ -88,7 +89,7 @@ class PseudoJob(object):
return
int
(
ceil
(
seq
*
job
.
deadline
/
rounded_wcet
(
job
)))
\
-
int
((
seq
-
1
)
*
job
.
deadline
/
rounded_wcet
(
job
))
@scheduler
(
"simso.schedulers.ER_PD2"
)
class
ER_PD2
(
Scheduler
):
def
init
(
self
):
self
.
ready_list
=
[]
...
...
simso/schedulers/FP.py
View file @
bfd65931
...
...
@@ -2,8 +2,13 @@
# coding=utf-8
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.FP"
,
required_task_fields
=
[
{
'name'
:
'priority'
,
'type'
:
'int'
,
'default'
:
'0'
}
]
)
class
FP
(
Scheduler
):
""" Fixed Priority (use 'priority' field) """
def
init
(
self
):
...
...
simso/schedulers/Fixed_PEDF.py
View file @
bfd65931
...
...
@@ -4,8 +4,9 @@
from
simso.core.Scheduler
import
SchedulerInfo
from
simso.schedulers.EDF_mono
import
EDF_mono
from
simso.utils
import
PartitionedScheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.Fixed_PEDF"
)
class
Fixed_PEDF
(
PartitionedScheduler
):
def
init
(
self
):
PartitionedScheduler
.
init
(
self
,
SchedulerInfo
(
"EDF_mono"
,
EDF_mono
))
...
...
simso/schedulers/G_FL.py
View file @
bfd65931
...
...
@@ -4,8 +4,9 @@ Anderson in Fair lateness scheduling: Reducing maximum lateness in G-EDF-like
scheduling.
"""
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.G_FL"
)
class
G_FL
(
Scheduler
):
"""Earliest Deadline First"""
def
init
(
self
):
...
...
simso/schedulers/G_FL_ZL.py
View file @
bfd65931
from
simso.core
import
Scheduler
,
Timer
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.G_FL_ZL"
)
class
G_FL_ZL
(
Scheduler
):
"""
G_FL with Zero Laxity Scheduler.
...
...
simso/schedulers/LB_P_EDF.py
View file @
bfd65931
...
...
@@ -5,8 +5,9 @@ Try to load balance the tasks among the processors.
from
simso.core.Scheduler
import
SchedulerInfo
from
simso.schedulers.EDF_mono
import
EDF_mono
from
simso.utils
import
PartitionedScheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.LB_P_EDF"
)
class
LB_P_EDF
(
PartitionedScheduler
):
def
init
(
self
):
PartitionedScheduler
.
init
(
self
,
SchedulerInfo
(
"simso.schedulers.EDF_mono"
))
...
...
simso/schedulers/LLF.py
View file @
bfd65931
from
simso.core
import
Scheduler
,
Timer
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.LLF"
)
class
LLF
(
Scheduler
):
"""Least Laxity First"""
def
init
(
self
):
...
...
simso/schedulers/LLREF.py
View file @
bfd65931
...
...
@@ -5,8 +5,9 @@ Implementation of the LLREF scheduler as presented by Cho et al. in
from
simso.core
import
Scheduler
,
Timer
from
math
import
ceil
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.LLREF"
)
class
LLREF
(
Scheduler
):
def
init
(
self
):
self
.
selected_jobs
=
[]
# Jobs currently running.
...
...
simso/schedulers/LLREF2.py
View file @
bfd65931
...
...
@@ -5,8 +5,9 @@ Implementation of the LLREF scheduler as presented by Cho et al. in
from
simso.core
import
Scheduler
,
Timer
from
math
import
ceil
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.LLREF2"
)
class
LLREF2
(
Scheduler
):
def
init
(
self
):
self
.
selected_jobs
=
[]
# Jobs currently running.
...
...
simso/schedulers/LRE_TL.py
View file @
bfd65931
...
...
@@ -6,8 +6,9 @@ Optimal Multiprocessor Scheduling Algorithm for Sporadic Task Sets".
from
simso.core
import
Scheduler
,
Timer
from
heapq
import
heappush
,
heapreplace
,
heappop
,
heapify
from
math
import
ceil
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.LRE_TL"
)
class
LRE_TL
(
Scheduler
):
def
init
(
self
):
"""
...
...
simso/schedulers/MLLF.py
View file @
bfd65931
from
simso.core
import
Scheduler
,
Timer
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.MLLF"
)
class
MLLF
(
Scheduler
):
"""Modified Least Laxity First"""
def
init
(
self
):
...
...
simso/schedulers/NVNLF.py
View file @
bfd65931
...
...
@@ -6,8 +6,9 @@ Multiprocessors."
from
simso.core
import
Scheduler
,
Timer
from
math
import
ceil
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.NVNLF"
)
class
NVNLF
(
Scheduler
):
def
init
(
self
):
self
.
selected_jobs
=
[]
# Jobs currently running.
...
...
simso/schedulers/PD2.py
View file @
bfd65931
...
...
@@ -2,6 +2,7 @@
from
simso.core
import
Scheduler
,
Timer
from
math
import
ceil
from
simso.schedulers
import
scheduler
def
rounded_wcet
(
job
,
q
=
None
):
...
...
@@ -88,7 +89,7 @@ class PseudoJob(object):
return
int
(
ceil
(
seq
*
job
.
deadline
/
rounded_wcet
(
job
)))
\
-
int
((
seq
-
1
)
*
job
.
deadline
/
rounded_wcet
(
job
))
@scheduler
(
"simso.schedulers.PD2"
)
class
PD2
(
Scheduler
):
quantum
=
100000
# cycles
...
...
simso/schedulers/P_EDF.py
View file @
bfd65931
...
...
@@ -4,8 +4,9 @@ Partitionned EDF using PartitionedScheduler.
from
simso.core.Scheduler
import
SchedulerInfo
from
simso.utils
import
PartitionedScheduler
from
simso.utils.PartitionedScheduler
import
decreasing_first_fit
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.P_EDF"
)
class
P_EDF
(
PartitionedScheduler
):
def
init
(
self
):
PartitionedScheduler
.
init
(
...
...
simso/schedulers/P_EDF2.py
View file @
bfd65931
...
...
@@ -6,8 +6,9 @@ Use EDF_mono.
from
simso.core
import
Scheduler
from
simso.core.Scheduler
import
SchedulerInfo
from
simso.schedulers.EDF_mono
import
EDF_mono
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.P_EDF2"
)
class
P_EDF2
(
Scheduler
):
def
init
(
self
):
# Mapping processor to scheduler.
...
...
simso/schedulers/P_EDF_WF.py
View file @
bfd65931
...
...
@@ -5,8 +5,9 @@ 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_worst_fit
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.P_EDF_WF"
)
class
P_EDF_WF
(
PartitionedScheduler
):
def
init
(
self
):
PartitionedScheduler
.
init
(
...
...
simso/schedulers/P_RM.py
View file @
bfd65931
...
...
@@ -3,8 +3,9 @@ Partitionned EDF using PartitionedScheduler.
"""
from
simso.core.Scheduler
import
SchedulerInfo
from
simso.utils
import
PartitionedScheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.P_RM"
)
class
P_RM
(
PartitionedScheduler
):
def
init
(
self
):
PartitionedScheduler
.
init
(
...
...
simso/schedulers/PriD.py
View file @
bfd65931
...
...
@@ -4,8 +4,9 @@ Priority-Driven Scheduling of Periodic Task Systems on Multiprocessors.
"""
from
simso.core
import
Scheduler
from
math
import
ceil
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.PriD"
)
class
PriD
(
Scheduler
):
"""EDF(k) scheduler"""
def
init
(
self
):
...
...
simso/schedulers/RM.py
View file @
bfd65931
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.RM"
)
class
RM
(
Scheduler
):
""" Rate monotonic """
def
init
(
self
):
...
...
simso/schedulers/RM_mono.py
View file @
bfd65931
...
...
@@ -2,8 +2,9 @@
Rate Monotic algorithm for uniprocessor architectures.
"""
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.RM_mono"
)
class
RM_mono
(
Scheduler
):
def
init
(
self
):
self
.
ready_list
=
[]
...
...
simso/schedulers/RUN.py
View file @
bfd65931
...
...
@@ -10,8 +10,9 @@ tasks with implicit deadlines.
from
simso.core
import
Scheduler
,
Timer
from
simso.schedulers.RUNServer
import
EDFServer
,
TaskServer
,
DualServer
,
\
select_jobs
,
add_job
,
get_child_tasks
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.RUN"
)
class
RUN
(
Scheduler
):
"""
RUN scheduler. The offline part is done here but the online part is mainly
...
...
simso/schedulers/Static_EDF.py
View file @
bfd65931
...
...
@@ -2,8 +2,13 @@
Static EDF. A DVFS variant of EDF (uniprocessor).
"""
from
simso.core
import
Scheduler
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.Static_EDF"
,
required_proc_fields
=
[
{
'name'
:
'priority'
,
'type'
:
'float'
,
'default'
:
'1.0'
}
]
)
class
Static_EDF
(
Scheduler
):
def
init
(
self
):
self
.
ready_list
=
[]
...
...
simso/schedulers/U_EDF.py
View file @
bfd65931
...
...
@@ -7,8 +7,9 @@ tasks"
from
simso.core
import
Scheduler
,
Timer
from
math
import
ceil
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.U_EDF"
)
class
U_EDF
(
Scheduler
):
def
init
(
self
):
self
.
al
=
{}
...
...
simso/schedulers/WC_RUN.py
View file @
bfd65931
...
...
@@ -3,8 +3,9 @@ Work-Conserving version of U-EDF.
"""
from
simso.schedulers.RUN
import
RUN
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.WC_RUN"
)
class
WC_RUN
(
RUN
):
def
init
(
self
):
RUN
.
init
(
self
)
...
...
simso/schedulers/WC_U_EDF.py
View file @
bfd65931
...
...
@@ -3,8 +3,9 @@ Work-Conserving version of U-EDF.
"""
from
simso.schedulers.U_EDF
import
U_EDF
from
simso.schedulers
import
scheduler
@scheduler
(
"simso.schedulers.WC_U_EDF"
)
class
WC_U_EDF
(
U_EDF
):
# def on_terminated(self, job):
# self.reschedule()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment