wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Parallel Computing Quiz

Total questions: 25

Worksheet time: 8mins

Name
Class
Date
1.

Which parallel computing model divides tasks into smaller sub-tasks executed simultaneously?

a)

SIMD

b)

MIMD

c)

SISD

d)

MISD

2.

In Flynn's taxonomy, which model is best suited for vector processing?

a)

SIMD

b)

MIMD

c)

SISD

d)

MISD

3.

Which type of parallel algorithm is used in divide-and-conquer problems like merge sort?

a)

Data-parallel

b)

Task-parallel

c)

Pipeline-parallel

d)

Recursive-parallel

4.

In parallel computing, what does "embarrassingly parallel" mean?

a)

Tasks require frequent synchronization

b)

Tasks are independent and can run without communication

c)

Tasks are sequential

d)

Tasks are highly interdependent

5.

What is a **two-way cache** in parallel computing?

a)

A cache shared between two processors

b)

A cache that allows two simultaneous read/write operations

c)

A cache with two levels (L1 and L2)

d)

A cache that uses two different replacement policies

6.

Which synchronization primitive ensures only one thread accesses a critical section at a time?

a)

Barrier

b)

Mutex

c)

Semaphore

d)

Spinlock

7.

In Pthreads, which function is used to create a new thread?

a)

`pthread_create()`

b)

`pthread_join()`

c)

`pthread_exit()`

d)

`pthread_mutex_lock()`

8.

What does `pthread_join()` do?

a)

Terminates a thread

b)

Waits for a thread to complete execution

c)

Locks a mutex

d)

Signals a condition variable

9.

What is the primary purpose of MPI?

a)

Shared-memory parallel programming

b)

Distributed-memory parallel programming

c)

GPU acceleration

d)

Real-time processing

10.

Which MPI function sends data from one process to another?

a)

`MPI_Send()`

b)

`MPI_Recv()`

c)

`MPI_Bcast()`

d)

`MPI_Barrier()`

11.

Which OpenMP directive parallelizes a loop?

a)

`#pragma omp parallel`

b)

`#pragma omp for`

c)

`#pragma omp critical`

d)

`#pragma omp barrier`

12.

What does the `reduction` clause in OpenMP do?

a)

Reduces the number of threads

b)

Combines partial results from threads into a single result

c)

Minimizes cache misses

d)

Optimizes loop unrolling

13.

Which graph algorithm is **not** easily parallelizable?

a)

Breadth-First Search (BFS)

b)

Depth-First Search (DFS)

c)

Dijkstra's algorithm

d)

PageRank

14.

Which parallel graph processing framework is used for large-scale graphs?

a)

MapReduce

b)

Pregel

c)

CUDA

d)

OpenCL

15.

Bitonic sort is primarily used in:

a)

Distributed systems

b)

GPU computing

c)

Parallel sorting networks

d)

Database indexing

16.

What is the time complexity of bitonic sort in parallel?

a)

O(n log n)

b)

O(log^2 n)

c)

O(n^2)

d)

O(n)

17.

Which searching algorithm is **not** suitable for parallelization?

a)

Binary search

b)

Parallel hash table lookup

c)

Tree traversal

d)

Linear search (brute-force)

18.

In parallel search, what is the **work pool method**?

a)

A shared queue of tasks for threads

b)

A distributed hash table

c)

A GPU-accelerated search

d)

A cache-coherent search

19.

In a hypercube parallel architecture, how many connections does each node have?

a)

log_2 N (where N is the number of nodes)

b)

N

c)

N/2

d)

2N

20.

Which problem is best suited for **pipelining** in parallel computing?

a)

Matrix multiplication

b)

Sorting

c)

Stream processing (e.g., video encoding)

d)

Graph traversal

21.

What is the parallel time complexity of matrix dot product with p processors?

a)

O(n^3)

b)

O(n^2/p)

c)

O(n log n)

d)

O(n)

22.

LU factorization is used for:

a)

Solving linear systems

b)

Graph coloring

c)

Image processing

d)

String matching

23.

What is the primary advantage of using a **task queue** in parallel programming?

a)

It reduces memory usage

b)

It increases the number of threads

c)

It simplifies code structure

d)

It allows for dynamic load balancing

24.

Which of the following is a common challenge in **shared-memory** parallel programming?

a)

Thread starvation

b)

Load imbalance

c)

Network latency

d)

Data races

25.

In parallel computing, what does **Amdahl's Law** primarily address?

a)

The overhead of thread management

b)

The efficiency of memory usage

c)

The scalability of algorithms

d)

The speedup of a task with multiple processors