diff --git a/tasksetgen.py b/tasksetgen.py index 75330bc..e4f24ef 100755 --- a/tasksetgen.py +++ b/tasksetgen.py @@ -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'),