Workflow Scheduling
1. Directed Acyclic Graphs
Job precedences define a DAG
- Vertices in
are jobs. - Edge
if job must be completed before job can start.
This may require forced idleness. Most such problems are NP-hard. Optimal methods are known only under restrictive assumptions (e.g. unit processing times
Some common topologies include:
- Chains where jobs are linearly ordered.
- In-Tree: each job has at most one successor,
- Out-Tree: each job has at most one predecessor.
- Opposing Forest: a set of in-trees and out-trees, where each job is in at most one tree.
- Series-Parallel Graph: each job is either executed in series or in parallel with another job.
2. Hu's Critical Path Rule
To solve
- The exit node has level
. - All other nodes have level
where is the set of edges in the DAG.\ - The maximum level (optimal makespan) is
.
Hu's algorithm is a list scheduler that prioritises jobs with the highest level. It's
2.1 Assigning Machines
To process DAG in time
where
2.2 Other Applications
Hu's algorithm is also optimal for
Its also optimal for Disjoint in-trees by adding a dummy successor with
Hu's algorithm also approximates
3. Muntz-Coffman Algorithm
An extention of Hu's algorithm for the preemptive case for in-trees an out-trees, and for general DAGs on two machines.
A subset sequence is a partition of jobs
such that:
- If
is a node of then for some . - If
is a successor of then . Essentially, its a partition of sets where each set contains jobs that can be executed in parallel.
Given a subset sequence for
- If
, receives time units on machines using McNaughton's wrap around rule. - If
, receives one time unit on machines.
To obtain the subset sequence:
- Set
. is the set of all nodes which have not yet been assigned to subsets and have label . - Assign all nodes in
to . If go to step 5. - If
then stop. Otherwise, and go to step 2. is the set of all unassigned nodes whose predecessors are all in . - Add to
the nodes with largest until or Q is empty. Go to step 4.
Muntz-Coffman Algorithm is optimal for pmtn, its always possible to break down
The worst case ratio for
4. Generalized Workflow Scheduling
In heterogeneous systems, jobs may execute non-preemptively on different machines with an interconnect. Now:
- Job
has processing time on machine . - Each precedence
has a communication cost between machines and . .
The Earliest Start Time of job
Where:
is the time machine finishes its last assigned job. assumes predecessor is scheduled on machine . is the completion time of job on machine .
The Earliest Finish Time of job
4.1 HEFT Scheduling
Heterogeneous Earliest Finish Time (HEFT) is a list scheduling algorithm:
- Compute avg execution cost
and communication cost across machines. - Assign jobs priorities based on upward rank
, where exit nodes have . - Schedule
with largest on machine with smallest .