This preview shows page 1. Sign up to view the full content.
Unformatted text preview: imality(x[i]);
} Coarse granularity partitioning:
1 “task” = 10 elements
Decreased synchronization cost
(Critical section entered 10 times less) So... have we done better?
CMU 15-418, Spring 2014 Rule of thumb
▪ Useful to have many more tasks* than processors
(many small tasks enables good workload balance via dynamic assignment) - Motivates small granularity tasks ▪ But want as few tasks as possible to minimize overhead of
managing the assignment
- Motivates large granularity tasks ▪ Ideal granularity depends on many factors
(Common theme in this course: must know your workload, and your machine)
* I had to pick a term. Here I’m using “task”
generally: it’s a piece of work, a sub-problem, etc.
CMU 15-418, Spring 2014 Smarter task scheduling
Consider dynamic scheduling via a shared work queue
What happens if the system assigns these tasks to workers in left-to-right order?
Cost 16 Tasks CMU 15-418, Spring 2014 Smarter task scheduling
What happens if scheduler runs the long task last? Potential for load i...
View Full Document
This document was uploaded on 03/19/2014 for the course CMP 15-418 at Carnegie Mellon.
- Spring '14