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 preemption 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(T/sub 1//P+S), where T/sub 1/ 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.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.