Commit 416f5a30 by Tobias Langer

Fixed error in utilization calculation.

parent 324d76cf
......@@ -81,7 +81,7 @@ class Task:
self.period = int(period)
self.deadline = int(deadline)
def check_taskset(procs, tasklist):
def calc_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 \
check_taskset(args.cores, taskset) <= 1 and \
calc_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(check_taskset(args.cores, taskset), 2))
utilization = str(round(calc_utilization(taskset), 2))
utilization.replace('.', '_')
name = 'taskset_{}_{}_{}'.format(now.strftime('%Y_%m_%d_%H_%M_%S'),
......
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