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
634b8beb
authored
May 04, 2015
by
Maxime Chéramy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BF scheduler: fix indentation.
parent
da5ee2c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
schedulers/BF.py
+10
-8
No files found.
schedulers/BF.py
View file @
634b8beb
...
...
@@ -88,12 +88,13 @@ class BF(Scheduler):
eligible
=
[]
print
(
"{:#^60}"
.
format
(
" Scheduling Interval [{},{}) "
.
format
(
self
.
sim
.
now
()
/
self
.
sim
.
cycles_per_ms
,
self
.
t_f
/
self
.
sim
.
cycles_per_ms
)))
" Scheduling Interval [{},{}) "
.
format
(
self
.
sim
.
now
()
/
self
.
sim
.
cycles_per_ms
,
self
.
t_f
/
self
.
sim
.
cycles_per_ms
)))
for
task
in
self
.
task_list
:
if
not
task
.
job
.
is_active
():
self
.
rw
[
task
.
identifier
]
=
0
self
.
pw
[
task
.
identifier
]
=
0
self
.
rw
[
task
.
identifier
]
=
0
self
.
pw
[
task
.
identifier
]
=
0
continue
rw
=
self
.
rw
[
task
.
identifier
]
...
...
@@ -101,8 +102,8 @@ class BF(Scheduler):
/
Fraction
(
task
.
job
.
period
))
/
Fraction
(
self
.
sim
.
cycles_per_ms
))
m
=
int
(
m_pure
)
self
.
pw
[
task
.
identifier
]
=
m_pure
-
m
mand
[
task
.
identifier
]
=
max
(
0
,
m
*
self
.
sim
.
cycles_per_ms
)
self
.
pw
[
task
.
identifier
]
=
m_pure
-
m
mand
[
task
.
identifier
]
=
max
(
0
,
m
*
self
.
sim
.
cycles_per_ms
)
# print("rw: {:>4}".format(rw))
# print("{}:, w: {}, m_pure: {:>4}, m: {:>2}, pw: {:>4}, mand: {}".format(
...
...
@@ -110,10 +111,11 @@ class BF(Scheduler):
# self.pw[task.identifier], mand[task.identifier]))
available
-=
mand
[
task
.
identifier
]
if
mand
[
task
.
identifier
]
<
w
and
self
.
pw
[
task
.
identifier
]
>
0
:
if
mand
[
task
.
identifier
]
<
w
and
self
.
pw
[
task
.
identifier
]
>
0
:
eligible
.
append
(
task
)
self
.
rw
[
task
.
identifier
]
=
self
.
pw
[
task
.
identifier
]
*
self
.
sim
.
cycles_per_ms
self
.
rw
[
task
.
identifier
]
=
\
self
.
pw
[
task
.
identifier
]
*
self
.
sim
.
cycles_per_ms
print
(
"{:#^60}"
.
format
(
" Done "
))
...
...
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