Carnegie Mellon Parralel Computing Notes on Lecture 6

G same cost on average p1 p2 p3 jobs have unequal but

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 418, Spring 2014 Static assignment ▪ Assignment of work to threads is pre-determined - Not necessarily compile-time (assignment algorithm may depend on runtime parameters such as input data size, number of threads, etc.) ▪ Recall solver example: assign equal number of grid cells to each thread - We discussed blocked and interleaved static assignments ▪ Good properties: simple, essentially zero runtime overhead (in this example: extra work to implement assignment is a little bit of indexing math) CMU 15-418, Spring 2014 Static assignment ▪ When is static assignment applicable? ▪ When the cost (execution time) of work and the amount of work is predictable ▪ Simplest example: it is known that all work has the same cost Time to perform job P1 P2 P3 P4 CMU 15-418, Spring 2014 Static assignment ▪ When is static assignment applicable? - Time Example 2: predictable, but not all jobs have same cost (see example below) Example 3: When statistics about execution time are known (e.g., same cost on average) P1 P2 P3 Jobs have unequal, but known cost: assign to processors to ensure overall good load balance P4 CMU 15-418, Spring 2014 “Semi-static” assignment ▪ Cost of work predictable for near-term future - Recent past good predictor of near future ▪ Periodically pro le application and re-adjust assignment - Assignment is static during interval between re-adjustment Image credit: Particle simulation: Adaptive mesh...
View Full Document

This document was uploaded on 03/19/2014 for the course CMP 15-418 at Carnegie Mellon.

Ask a homework question - tutors are online