Heterogeneous earliest finish time
Heterogeneous earliest finish time (or HEFT) is a heuristic to schedule a set of dependent tasks onto a network of heterogenous workers taking communication time into account.[1] For inputs HEFT takes a set of tasks, represented as a directed acyclic graph, a set of workers, the times to execute each task on each worker, and the times to communicate the results from each job to each of its children between each pair of workers. It descends from list scheduling algorithms.
Algorithm
HEFT executes in two phases.
Prioritizing tasks
In the first phase each task is given a priority. The priority of each task [math]\displaystyle{ n_i }[/math] is usually designated to be its "upward rank" which is defined recursively as follows
[math]\displaystyle{ rank_u(n_i) = \overline{w_i} + \max_{n_j \in succ(n_i)} (\overline{c_{i,j}} + rank_u(n_j)) }[/math]
where [math]\displaystyle{ n_i }[/math] represents the [math]\displaystyle{ i^{th} }[/math] task, [math]\displaystyle{ \overline{w_i} }[/math] is an average computation cost of job i among all the processor, [math]\displaystyle{ succ(n_i) }[/math] is the set of all jobs that immediately depend on task [math]\displaystyle{ n_i }[/math], and [math]\displaystyle{ \overline{c_{i,j}} }[/math] is the average communication cost of the variables transferred between jobs [math]\displaystyle{ n_i }[/math] and [math]\displaystyle{ n_j }[/math] between all pairs of workers. Note that the computation of [math]\displaystyle{ rank_u(n_i) }[/math] depends on the computation of the rank of all its children. The upward rank is meant to represent the expected distance of any task from the end of the computation. For averaged quantities like [math]\displaystyle{ \overline{w_i} }[/math] different averages may provide different results.[2]
Assigning tasks to workers
In the second phase tasks are assigned to workers. Now that all tasks are prioritized we consider and schedule each one, starting with the highest priority. The task with the highest priority for which all dependent tasks have finished is scheduled on the worker which will result in the earliest finish time of that task. This finish time depends on the communication time to send all necessary inputs to the worker, the computation time of the task on the worker, and the time when that processor becomes available (it may be busy with another task). HEFT uses an insertion-based policy that fills sufficiently sized gaps between already scheduled tasks.
Discussion
HEFT is well respected among heuristic algorithms for this problem. But in complex situations it can easily fail to find the optimal scheduling. HEFT is essentially a greedy algorithm and incapable of making short-term sacrifices for long term benefits. Some improved algorithms based on HEFT look ahead to better estimate the quality of a scheduling decision can be used to trade run-time for scheduling performance.[3][4]
Code
A Python implementation of HEFT is available on github
A C++ implementation of HEFT is available on github
References
- ↑ Topcuoglu, Haluk; Hariri, Salim; Wu, M. (2002). "Performance-effective and low-complexity task scheduling for heterogeneous computing". IEEE Transactions on Parallel and Distributed Systems 13 (3): 260–274. doi:10.1109/71.993206.
- ↑ Zhao, Henan; Sakellariou, Rizos (2003). "An Experimental Investigation into the Rank Function of the Heterogeneous Earliest Finish Time Scheduling Algorithm". Euro-Par 2003 Parallel Processing. Lecture Notes in Computer Science. 2790. pp. 189–194. doi:10.1007/978-3-540-45209-6_28. ISBN 978-3-540-40788-1.
- ↑ Bittencourt, Luiz F; Sakellariou, Rizos; Madeira, Edmundo R M (2010). "DAG Scheduling Using a Lookahead Variant of the Heterogeneous Earliest Finish Time Algorithm". Euromicro Conference on Parallel, Distributed and Network-based Processing. doi:10.1109/PDP.2010.56. http://dl.acm.org/citation.cfm?id=1800391.
- ↑ Arabnejad, Hamid; Barbosa, Jorge G. (2014). "List Scheduling Algorithm for Heterogeneous Systems by an Optimistic Cost Table". IEEE Transactions on Parallel and Distributed Systems 25 (3): 682–694. doi:10.1109/TPDS.2013.57. ISSN 1045-9219. https://ieeexplore.ieee.org/document/6471969.
![]() | Original source: https://en.wikipedia.org/wiki/Heterogeneous earliest finish time.
Read more |