NEW
Font size
WorksheetsParallel Computing Quiz
Total questions: 25
Worksheet time: 8mins
Which parallel computing model divides tasks into smaller sub-tasks executed simultaneously?
SIMD
MIMD
SISD
MISD
In Flynn's taxonomy, which model is best suited for vector processing?
SIMD
MIMD
SISD
MISD
Which type of parallel algorithm is used in divide-and-conquer problems like merge sort?
Data-parallel
Task-parallel
Pipeline-parallel
Recursive-parallel
In parallel computing, what does "embarrassingly parallel" mean?
Tasks require frequent synchronization
Tasks are independent and can run without communication
Tasks are sequential
Tasks are highly interdependent
What is a **two-way cache** in parallel computing?
A cache shared between two processors
A cache that allows two simultaneous read/write operations
A cache with two levels (L1 and L2)
A cache that uses two different replacement policies
Which synchronization primitive ensures only one thread accesses a critical section at a time?
Barrier
Mutex
Semaphore
Spinlock
In Pthreads, which function is used to create a new thread?
`pthread_create()`
`pthread_join()`
`pthread_exit()`
`pthread_mutex_lock()`
What does `pthread_join()` do?
Terminates a thread
Waits for a thread to complete execution
Locks a mutex
Signals a condition variable
What is the primary purpose of MPI?
Shared-memory parallel programming
Distributed-memory parallel programming
GPU acceleration
Real-time processing
Which MPI function sends data from one process to another?
`MPI_Send()`
`MPI_Recv()`
`MPI_Bcast()`
`MPI_Barrier()`
Which OpenMP directive parallelizes a loop?
`#pragma omp parallel`
`#pragma omp for`
`#pragma omp critical`
`#pragma omp barrier`
What does the `reduction` clause in OpenMP do?
Reduces the number of threads
Combines partial results from threads into a single result
Minimizes cache misses
Optimizes loop unrolling
Which graph algorithm is **not** easily parallelizable?
Breadth-First Search (BFS)
Depth-First Search (DFS)
Dijkstra's algorithm
PageRank
Which parallel graph processing framework is used for large-scale graphs?
MapReduce
Pregel
CUDA
OpenCL
Bitonic sort is primarily used in:
Distributed systems
GPU computing
Parallel sorting networks
Database indexing
What is the time complexity of bitonic sort in parallel?
O(n log n)
O(log^2 n)
O(n^2)
O(n)
Which searching algorithm is **not** suitable for parallelization?
Binary search
Parallel hash table lookup
Tree traversal
Linear search (brute-force)
In parallel search, what is the **work pool method**?
A shared queue of tasks for threads
A distributed hash table
A GPU-accelerated search
A cache-coherent search
In a hypercube parallel architecture, how many connections does each node have?
log_2 N (where N is the number of nodes)
N
N/2
2N
Which problem is best suited for **pipelining** in parallel computing?
Matrix multiplication
Sorting
Stream processing (e.g., video encoding)
Graph traversal
What is the parallel time complexity of matrix dot product with p processors?
O(n^3)
O(n^2/p)
O(n log n)
O(n)
LU factorization is used for:
Solving linear systems
Graph coloring
Image processing
String matching
What is the primary advantage of using a **task queue** in parallel programming?
It reduces memory usage
It increases the number of threads
It simplifies code structure
It allows for dynamic load balancing
Which of the following is a common challenge in **shared-memory** parallel programming?
Thread starvation
Load imbalance
Network latency
Data races
In parallel computing, what does **Amdahl's Law** primarily address?
The overhead of thread management
The efficiency of memory usage
The scalability of algorithms
The speedup of a task with multiple processors
