How to schedule a DAG onto a given number of machines