Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Tobias Langer
/
experiment
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
416f5a30
authored
Nov 21, 2016
by
Tobias Langer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed error in utilization calculation.
parent
324d76cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tasksetgen.py
+3
-3
No files found.
tasksetgen.py
View file @
416f5a30
...
...
@@ -81,7 +81,7 @@ class Task:
self
.
period
=
int
(
period
)
self
.
deadline
=
int
(
deadline
)
def
c
heck_taskset
(
procs
,
tasklist
):
def
c
alc_utilization
(
tasklist
):
sum
=
0
for
task
in
tasklist
:
sum
+=
task
.
wcet
/
task
.
period
...
...
@@ -179,7 +179,7 @@ def main():
while
len
(
tasksets
)
<
args
.
tasksetcount
:
taskset
=
[]
while
len
(
taskset
)
<
args
.
cores
+
1
or
\
c
heck_taskset
(
args
.
cores
,
taskset
)
<=
1
and
\
c
alc_utilization
(
taskset
)
<=
args
.
cores
and
\
hyperperiod
(
taskset
)
<
300000
:
# Limit hyperperiod to 5 minutes
taskset
.
append
(
create_task
(
distribution
))
if
len
(
taskset
)
>=
args
.
cores
+
1
:
...
...
@@ -208,7 +208,7 @@ def main():
out
[
'deadline'
]
=
task
.
deadline
task_out
.
append
(
out
)
utilization
=
str
(
round
(
c
heck_taskset
(
args
.
cores
,
taskset
),
2
))
utilization
=
str
(
round
(
c
alc_utilization
(
taskset
),
2
))
utilization
.
replace
(
'.'
,
'_'
)
name
=
'taskset_{}_{}_{}'
.
format
(
now
.
strftime
(
'
%
Y_
%
m_
%
d_
%
H_
%
M_
%
S'
),
...
...
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