< previous page page_514 next page >

Page 514
Table 8.1 Grain size.
(Informal) Grain Description
Program ConstructTypical # Instr
Fine grain
Basic block ("instr-level parallelism")510
.
Procedure20100
Medium grain
Small task ("process-level parallelism")1001,000
.
Intermediate task1,000100,000
Coarse grain
Large task100,000 or more

multiprocessor concurrency and instruction-level concurrency (discussed in the previous chapter) is the amount of overhead expected to be associated with each task. Overhead affects speedup. If uniprocessor program P1 does operation O1, then the parallel version of P1 does operations Op, where Op³ O1.
For each task Ti, there is an associated number of overhead operations oi, so that if Ti takes Oi operations without overhead, then:
0514-01.gif
where is the total work done by Pp, including overhead. Note that the task overhead grows with p.
In order to achieve speedup over a uniprocessor, a multiprocessor system must achieve the maximum degree of parallelism among executing subtasks or control nodes. On the other hand, if we increase the amount of parallelism by using finer-and finer-grain task sizes, we necessarily increase the amount of overhead. This defines the well known "U" shaped curve for grain size (Figure 8.2).
0514-02.gif
Figure 8.2
The effects of grain size.

 
< previous page page_514 next page >