Previous | Next --- Slide 5 of 64
Back to Lecture Thumbnails
ufxela

In assignment 1, when we assigned work for computing the mandelbrot image in contiguous blocks based on the number of parallel executions that the user decided to call a program with, is that still static assignment, since technically we are computing the start and end of the blocks for each execution context at runtime?

MasonLlewellyn

@ufxela I think it should be static assignment. The start and end of each block is calculated at runtime in each individual thread but those values are already determined before any thread is actually run.

ishangaur

Could we do better here by breaking it up into the four quadrants?

thread17

@ishangaur I think breaking it up into four quadrants is another way to distribute the workload evenly across the four threads in this particular problem setup. So the four threads will be doing the same amount of work as in the blocked assignment approach. In terms of communications, I think the four quadrant approach might actually save us some rounds of communications because data that must be sent to each process from another process would be less than the amount of data that needs to be sent in the blocked assignment.

chii

I wonder if there are any benefits to more complicated static assignment schemes, for example a more stochastic, randomized arrangement. In cases where there are no interdependencies (e.g. Mandlebrot) would this be a viable solution?

felixw17

I wonder what how often static assignment is used in the real world. It seems to me that static assignment is best used when the programmer has a very good sense of the distribution of work before the work begins, which tends to be when the programmer knows the exact algorithm being used, as well as the inputs to the algorithm, and is therefore confident in being able to predict the sizes of various chunks of work. I suspect that in the real world, the actual distribution of work is very hard to predict beforehand, and so dynamic assignment would be more frequently seen than static assignment.

cyb

@chii I think a random arrangement would be viable, but may cost a little bit more during assignment.

One scenario where a more complicated static assignment might be useful is when the work of each task can be estimated through some computation that is less expensive than runtime assignment.

Please log in to leave a comment.