Provably Efficient Non-Preemptive Task Scheduling with ... - CiteSeerX

0 downloads 0 Views 34KB Size Report
graphs by using Cilk, a C-based runtime system for multithreaded parallel ... stages, and bundles parallel tasks of the same stage into one Cilk procedure.
Provably Efficient Non-Preemptive Task Scheduling with Cilk V. -Y. Vee and W.-J. Hsu School of Applied Science, Nanyang Technological University Nanyang Avenue, Singapore 639798. Abstract We consider the problem of scheduling static task graphs by using Cilk, a C-based runtime system for multithreaded parallel programming. We assume no pre-emption of task execution and no prior knowledge of the task execution times. Given a task graph G, the output of the scheduling algorithm is a Cilk program P which, when executed, initiates the tasks in consistence with the precedence requirements of G. We show that the Cilk model has restrictions in implementing optimal schedules for certain types of task graphs; however, the restriction does not fundamentally hinder the practical applications of Cilk, as it is possible to produce reasonably good quality schedules (in the sense of expected execution time). Our algorithm identifies a minimal number of stages, assigns tasks to these stages, and bundles parallel tasks of the same stage into one Cilk procedure. By using Tarjan’s algorithm (for set operations) to implement the bundling process, we demonstrate that the parallel schedule can be derived in O(n+e) time for all practical purposes, where n and e denote the number of nodes and edges in the task graph G. With P processors, the expected completion time for the scheduled tasks is bounded by Tp = O(T1/P+S), where T1 denotes the total work, i.e., the time required for executing all tasks on a single processor, and S denotes the sum (over all stages) of the longest execution time of the tasks at each stage. When the execution times of tasks are relatively homogeneous, the quality of the schedule generated by using our approach is nearly optimal. Index Terms: Scheduling, Cilk.

1

Introduction Task scheduling is one of the most

challenging problems in parallel and distributed computing [1]. The scheduling of an arbitrary task graph on arbitrary number of processors is NPcomplete [1,6]. We will introduce a sub-optimal approach to perform task scheduling based on Cilk, a provably efficient run-time system for multithreaded programming [2,4]. A set of tasks T will be specified as a strict (irreflexive) partially ordered set (T,