| Algorithm 1 Workflow scheduling Based on HEFT |
| Input: the workflow , W[i][k], B[k][l] Output: A task_list sorted in descending order of Upward rank, the allocation of task to VM for each task in do rank_u] ← 0 end for for each task in reverse topological order of Dag do Obtain the average computation time using Equation (17) if is empty then rank_u else Obtain the by Equations (18)–(20) Update the by Equation (21) end if end for task_list ← [] temp_list ← sort by in descending order while temp_list is not empty do for each task in temp_list do all_pred_scheduled ← true for each predecessor task of do if not in task_list then all_pred_scheduled ← false break end if end for if all_pred_scheduled then task_list.append) temp_list.remove) break end if end for end while return task_list allocation ← {} machine_ready_time ← [0, 0, …, 0] for each task in task_list do earliest_finish_time ← ∞ selected_machine ← −1 for each machine k in Machines do Calculate of on Calculate of on Update the selected_machine based on earliest completion time end for Assign to the selected_machine Add this assignment to the allocation update the ready time of end for return allocation |