Parallel Processor Organization: Memory, Coordination, and Speedup
Parallel Processor Organization concerns how multiple processing units cooperate on a computation: where their data reside, how they exchange results, and what limits their combined performance. You encounter these questions when choosing between a multicore server and a cluster, or when explaining why doubling the number of cores does not halve a program's running time. The organization matters alongside the amount of work that can run simultaneously.
Organizing access to memory
In a shared-memory organization, processors can access a common memory address space. They exchange data through shared locations, although individual workers can also maintain private data. A multicore chip contains several processing cores on one chip; a multiprocessor server can also contain several processor packages. Either arrangement can support shared memory.
In a distributed-memory organization, processing nodes have separate local address spaces. Data needed elsewhere are exchanged explicitly, commonly through messages. A cluster can combine both arrangements: cores share memory within each node, while nodes exchange messages across a network.
Shared memory need not occupy one physical bank. With NUMA, processors can access a shared address space even though some memory is physically closer to particular processors. UMA describes the contrasting arrangement.
Organization | Memory visible to processors | Typical communication concern |
|---|---|---|
Shared memory with UMA | Common address space with approximately uniform access time | Contention for shared memory bandwidth |
Shared memory with NUMA | Common address space with location-dependent access time | Placement of data near the processors using them |
Distributed memory | Separate local address spaces | Message transfer and coordination between nodes |
Physical distribution of memory does not, by itself, establish separate address spaces. Also distinguish hardware organization from programming interfaces: message-passing software can run on a shared-memory machine.
Coordinating cooperating processors
Parallel workers need both the right data and permission to use those data at the right time. Cache coherence addresses agreement between cached copies. Synchronization controls interactions between workers, such as protecting a shared update or waiting for required results.
A counter increment illustrates the distinction. Reading the counter, adding one, and writing the result are separate operations unless an appropriate mechanism combines or protects them. Two workers can read the same old value and overwrite each other's increments even with coherent caches. A correctly used lock can protect the complete update.
Performance also depends on how work is divided. If one worker receives substantially more work, others may wait at a barrier. More processors can also increase traffic on shared communication and memory paths.
Predicting fixed-workload performance
For a useful baseline, assume identical cores, a fixed workload, and perfectly balanced division of its parallelizable work. Let T1 be the one-core time, s its serial fraction, N the number of cores, and HN the additional, non-overlapping elapsed-time overhead at N cores. Then
The serial work retains its original duration. Only the parallelizable portion is divided by N. Overhead can include additional communication, startup, and synchronization costs; it is elapsed time, not the sum of all workers' waiting times.
The speedup and parallel efficiency are
Efficiency is normalized speedup, rather than a direct measurement of processor utilization. Multiply it by 100% to report a percentage.
With HN=0, this is Amdahl's law. For s>0, its ideal limiting speedup is 1/s. This bound assumes the same fixed workload and unchanged serial work. Positive overhead reduces speedup within the model; overhead that grows with core count can even make an added core configuration slower.
What to remember
- Classify memory by addressability as well as physical placement.
- Separate cache coherence from synchronization.
- Divide parallel work, retain serial work, and add stated overhead.
- Compare configurations using elapsed time, speedup, and efficiency.
Example: Choosing cores for a scan-processing job
A laboratory's scan-processing job takes 160 s on one core. Preparing the input takes 20 s and remains serial. The remaining processing can be divided evenly among identical cores, each working at the original one-core rate. Additional parallel overhead, meaning elapsed time added by startup and coordination, is 5 s on four cores and 8 s on eight cores. These costs do not overlap the useful computation. Compare configurations for the same fixed job.
a) Calculate the elapsed time on four cores.
First separate the unchanged preparation from the work that can be divided. The parallelizable portion of the one-core execution is ________, since
With balanced work on four cores, the parallel phase lasts ________:
The preparation, parallel processing, and additional overhead occur without overlap, so add their durations:
The four-core elapsed time is 60.0 s. Dividing the full 160 s by four would incorrectly accelerate the serial preparation and omit overhead.
b) Calculate four-core speedup and efficiency. Report speedup to two decimal places and efficiency to one decimal place.
The speedup compares the original one-core elapsed time with the new elapsed time:
For efficiency, divide this unrounded speedup by four. Equivalently, the denominator 4T4 is ________, giving
The four-core configuration gives 2.67 speedup and 66.7% efficiency. These values describe performance relative to the baseline; the efficiency percentage is not a direct measurement of core utilization.
c) Calculate the eight-core elapsed time, speedup, and efficiency using the same reporting precision. Is it faster than the four-core configuration?
The serial preparation still takes 20 s. The evenly divided parallel phase now lasts ________, since
Include the eight-core overhead rather than reusing the four-core value:
Calculate speedup and efficiency without rounding intermediate values:
The elapsed-time reduction relative to four cores is
The eight-core configuration takes 45.5 s, gives 3.52 speedup and 44.0% efficiency, and finishes 14.5 s sooner. It is faster, but its normalized efficiency is lower: more cores reduce the parallel phase while serial preparation remains unchanged and overhead increases.
A shared-memory multiprocessor runs software threads across several cores while processing image batches. Match each term to its description. Each description is used once.
Different cores concurrently perform distinct functions, such as filtering images and encoding completed results.
Several cores apply the same filter to different images from one batch.
Work is assigned or redistributed to reduce differences in the workloads carried by different cores.
A scheduling preference or restriction assigns a thread to a particular core or set of cores.
Data parallelism
Load balancing
Processor affinity
Task parallelism
A fixed data-analysis job takes 200 s on one core and 80 s on four identical cores. Assume no additional parallel overhead, unchanged serial work, and perfectly balanced parallel work that runs four times faster on four cores. What percentage of the one-core execution time is serial? Answer as a percentage, to one decimal place.