Parallel computing is the practice of dividing work so multiple processors, cores, or computers can perform parts of the computation at the same time. It is useful when one large task can be separated into smaller tasks that can run together.
Instead of one person doing every part of a job in order, several people work on different pieces at the same time.
Showing a random 20 of 50 problems.
Example 1
medium
Two processes each hold a lock the other needs and wait forever. What is this called?
Example 2
medium
A program is 80% parallelizable and 20% strictly serial. With unlimited processors, the parallel part takes ~0 time. What is the maximum possible speedup?
Example 3
medium
Two parallel threads each read a shared balance of 100, add 50, and write back, but interleave so the result is 150 instead of 200. Name the bug and the standard fix.
Example 4
challenge
A team applies Gustafson's law: with p=16 processors and parallel fraction 0.9, scaled speedup is S=pโs(pโ1) where s=0.1. Compute S.
Example 5
medium
With 8 processors a task reaches 6x speedup. What is the parallel efficiency?
Example 6
challenge
You can split a 1,000,000-element sum across processors, but combining partial sums costs log2(p) merge steps. With p=8, the parallel work is ~1000000/8 and merging adds 3 steps. Why does merging cost grow only logarithmically?8 โ 4 โ 2 โ 1: logโ(8) = 3 merge levels
Example 7
challenge
A reduction over n=220 elements uses a tree reduction. With p=n/2 processors per level, what is total parallel time in tree levels?
Example 8
easy
Speedup is defined as T1โ/Tpโ. If T1โ=100s and Tpโ=25s, what is the speedup?
Example 9
easy
In the speedup formula T1โ/Tpโ, what does Tpโ represent?
Example 10
easy
A task takes 60 seconds on 1 processor. If it splits perfectly across 3 processors, how long does it take?60 รท 3 = 20 s โ perfect split across 3 processors
Example 11
hard
Why does false sharing in shared-memory parallel code slow programs down?
Example 12
easy
In T1โ/Tpโ, what does the subscript 1 mean?
Example 13
medium
A task is 60% parallelizable. With unlimited processors the parallel part takes 0. What is the max speedup?
Example 14
hard
What name describes a parallel program where one worker becomes much busier than the others and finishes last?
Example 15
medium
By Amdahl's law, with serial fraction s=0.25 and infinite processors, maximum speedup is 1/s. Compute it.
Example 16
easy
Two students each grade their own quiz; one finishes in 5 min, the other in 6 min. What is the total wall time?
Example 17
hard
On 4 processors a 100s task takes 30s. Compute speedup, efficiency, and serial fraction by Amdahl.
Example 18
hard
A parallel sort on 8 cores achieves 6x speedup. A team adds 8 more cores and sees only 7x. Compute efficiencies and decide if adding more cores is worth it.
Example 19
easy
Speedup formula is T1โ/Tpโ. If T1โ=120s and Tpโ=30s, find the speedup.
Example 20
medium
A 256-task workload runs on 16 cores. If tasks take equal time and load is balanced, how many tasks per core?