What are the four steps in the Parallel Design Process?
These steps help in analyzing and designing parallel algorithms.
What is a dependency in the context of parallel computing?
A situation where one operation must complete before another can begin
Dependencies are considered the enemy of parallelism.
True or false: Only RAW dependencies limit parallelism.
TRUE
WAR and WAW dependencies can often be worked around.
What are the three types of data dependencies?
Each type has different implications for parallel execution.
What is a loop-carried dependency?
A dependency where iteration i depends on results from iteration i-k
These dependencies are primary barriers to loop parallelization.
What is the key insight regarding S2 and S3 in the dependency example?
S2 and S3 can run in parallel because they have no dependency on each other
This illustrates how dependencies affect execution order.
What are Bernstein’s Conditions for Parallelism?
These conditions help determine if two tasks can run in parallel.
What is data decomposition in parallel computing?
Partitioning the data and applying the same operation
This strategy is useful for uniform workloads.
What is the block distribution strategy?
Divide data into contiguous chunks
Best for uniform workloads where each element takes the same time to process.
What is the cyclic distribution strategy?
Assign elements in round-robin fashion
Best for non-uniform workloads where processing time varies by element position.
What is the block-cyclic distribution strategy?
Assign blocks of size B in round-robin fashion
Used in ScaLAPACK and many HPC applications.
What is the functional (task) decomposition?
Partitioning the computation/functions
Different processors execute different tasks, often combined in real applications.
What is the pipeline decomposition?
A special form of functional decomposition where stages operate on a stream of data
It helps in improving latency and throughput.
What is the recursive decomposition?
Dividing a problem into subproblems of the same type and solving them in parallel
Commonly used in divide-and-conquer algorithms.
What does a dependency graph show?
Which operations must precede others
It helps visualize dependencies and critical paths.
What is the critical path in a dependency graph?
The longest path through the graph, determining the minimum time to complete all tasks
It indicates the maximum speedup possible.
What are the three techniques to eliminate or reduce dependencies?
These techniques help enable parallelism by addressing different types of dependencies.
What is the first step in the PCAM model for parallel algorithm design?
Partitioning
Decompose problem into tasks (Data or functional).
In OpenMP, what directive is used to indicate a parallel for loop?
pragma omp parallel for
This directive allows multiple iterations of the loop to be executed in parallel.
What does the reduction clause do in OpenMP?
Combines values from multiple threads into a single value
Example: #pragma omp parallel for reduction(+:sum) for summing elements.
What is the purpose of loop fission?
Split loops to separate dependencies
This can allow for parallel execution of independent parts.
What is the goal of load balancing in parallel computing?
Even distribution of computation
This helps to maximize resource utilization and minimize idle time.
True or false: Fine-grained tasks have a small size and many tasks.
TRUE
Fine-grained tasks typically have higher overhead due to more synchronization.
What are the communication patterns in parallel computing?
These patterns determine how tasks exchange data.