Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Jigsaw Puzzle Metaphor

Similar presentations


Presentation on theme: "The Jigsaw Puzzle Metaphor"— Presentation transcript:

1 The Jigsaw Puzzle Metaphor
Concurrency Issues Developed by the Oklahoma University Supercomputing Center for Education and Research Inspired by Analogies for Teaching Parallel Computing to Inexperienced Programmers SIGCSE Bulletin vol 38 #4 December 2006, p 64 Copyright © Curt Hill

2 The Analogy Presume for this metaphor that there is a jigsaw puzzle
Suppose that two people are going to work on it If either would work alone, that person could finish the puzzle in one hour If they work together, how long will it take? Why? Copyright © Curt Hill

3 What slows the process? Both reaching for the pile of pieces at the same time Both reaching for the same piece at the same time One holding a piece that the other needs What happens if two more people sit down and help? How does the elapsed time change as well as the person-hour time? How about ten more? Copyright © Curt Hill

4 Another Supposition Suppose that the top half is sky and the bottom half is grass One person is working on the grass and the other the sky Where will the conflicts occur? Will this be better or worse than when the entire puzzle has a similar look? Copyright © Curt Hill

5 Dividing the task Suppose that I can divide the puzzle into two sets of pieces One is on one table and the other on another Each table has pieces that will form a contiguous half of the puzzle Will the two people do better or worse than the two working at same table? What happens when the two are joined? Copyright © Curt Hill

6 Rejoining the pieces Will the effort of putting the two halves together larger or smaller than when this is on one table? How does the splitting of the puzzle factor in? What if there were four tables (or ten) that have to be rejoined? Suppose that the divide/join problem is easy – what would be the maximum number of tables? Copyright © Curt Hill

7 Distribution Again What would happen if the two tables did not have the same number of pieces? Or one table’s pieces are harder to reassemble? What if first person could finish the puzzle in one hour alone, but the second person would take two hours. How should the pieces be distributed? Copyright © Curt Hill

8 Explanations When two people work at the same table this is similar to multiple CPUs sharing the same memory Multiple tables suggest distributed computing There are different costs associated with each Copyright © Curt Hill


Download ppt "The Jigsaw Puzzle Metaphor"

Similar presentations


Ads by Google