AP CSP 4.3 Parallel and Distributed Computing | Speedup and Scaling
Parallel and Distributed Computing
After this lesson, you will be able to:
- Distinguish sequential, parallel, and distributed computing by how the work is organized
- Explain that a parallel solution splits a task into parts that run at the same time and then combines the results
- Compute speedup as the sequential time divided by the parallel time
- Estimate parallel run time from a sequential portion plus a parallelizable portion divided by the number of processors
- Explain why the sequential portion and overhead cap speedup, so adding processors gives diminishing returns
A video export takes your laptop 60 seconds using one processor core. You switch on all 3 cores and it finishes in 20 seconds, a speedup of 3. Excited, you imagine 100 cores finishing it in well under a second, but the real result barely dips below 15 seconds no matter how many cores you add. Why does throwing more processors at the job stop helping?
Three Ways to Organize the Work
The exam draws a sharp line between three models of computing, and the difference is entirely about how the work is organized, not about how fast the hardware is.
- Sequential computing runs steps one after another, one at a time. Step two does not start until step one finishes.
- Parallel computing breaks a single task into parts that run at the same time on multiple processors, then combines the partial results into one answer.
- Distributed computing uses multiple computers or devices connected by a network to work on one problem together, which lets you tackle problems too large or too slow for any single machine.
| Model | How work is organized | Key idea |
|---|---|---|
| Sequential | One step at a time on one processor | Order matters; nothing overlaps. |
| Parallel | Parts run simultaneously on several processors, then results are combined | Same machine, multiple processors, faster on a divisible task. |
| Distributed | Many separate computers cooperate over a network | Scales to problems too big for one machine. |
Read the stem for the words multiple processors (parallel) versus multiple computers or over a network (distributed). Parallel and distributed both do work at once, but distributed spreads it across separate networked machines. Sequential is the one with no overlap at all.
Speedup: Measuring the Payoff
Parallel computing is only worth it if it actually saves time, and the exam measures that with speedup. The formula is short and you must know it:
speedup = (time to complete sequentially) / (time to complete in parallel)
If a job takes 60 seconds run sequentially and 20 seconds run in parallel, then speedup = 60 / 20 = 3. A speedup of 3 means the parallel solution finished 3 times as fast. Speedup is a ratio, so it has no units; a speedup of 1 would mean parallelizing gained you nothing.
Estimating Parallel Run Time
Most real tasks have a part that must run sequentially and a part that can be split across processors. A useful model for the exam:
parallel time = (sequential part) + (parallelizable part / number of processors)
Suppose a task takes 100 seconds total, of which 20 seconds must run sequentially and the other 80 seconds can be divided evenly. With 4 processors:
parallel time = 20 + (80 / 4)
= 20 + 20
= 40 seconds
Now push it: with 8 processors the parallel part becomes 80 / 8 = 10, so the total is 20 + 10 = 30 seconds. Doubling the processors from 4 to 8 did not cut the time in half; it went from 40 to 30, because the 20 second sequential part cannot be sped up at all.
Why Adding Processors Stops Helping
Speedup has a ceiling. Two forces cap it:
- The sequential portion of a task cannot be parallelized. Even with infinite processors, the parallelizable part shrinks toward zero but the sequential part stays fixed, so the total time cannot fall below that sequential floor.
- Splitting the work and combining the partial results adds overhead. At some point the cost of coordinating one more processor outweighs the tiny time it saves.
That is why each extra processor helps less than the one before it, a pattern called diminishing returns. In the run time example, 20 seconds is the hard floor: no number of processors gets the job below 20 seconds.
Doubling the number of processors does not halve the total time when part of the task is sequential. Only the parallelizable portion is divided by the processor count; the sequential portion and the coordination overhead are unchanged. Any answer that assumes "twice the processors means half the time" for a mixed task is a distractor.
When Distributed Computing Wins
Some problems are simply too large for one machine, whether because of the amount of data, the memory needed, or the sheer volume of computation. Distributed computing connects many computers over a network so they can each handle a slice of the problem. Searching for signals in astronomy data, training on enormous datasets, and running a web service for millions of users all rely on distributed systems. The trade off is the same limit in a new form: coordinating separate machines across a network adds communication overhead, and any part that cannot be divided still gates the whole job.
💡 See it in action
How 4.3 Is Tested on the Multiple-Choice Exam
Topic 4.3 shows up on the MCQ section in a few very consistent shapes, so knowing them is worth several fast points.
-
Compute a speedup. You are given a sequential time and a parallel time and asked for the speedup. Use
speedup = sequential time / parallel time. Given 60 seconds sequential and 20 seconds parallel, the speedup is60 / 20 = 3. -
Compute a parallel run time. You are given a sequential portion, a parallelizable portion, and a processor count. Use
parallel time = sequential part + (parallelizable part / processors). Only the parallelizable part is divided by the processor count. - Explain the limit. You are asked why adding processors stops helping. The credited reason is that a portion of the task must run sequentially and there is overhead to split and recombine work, so speedup is capped and extra processors give diminishing returns.
- Classify the model. You are asked whether a scenario is sequential, parallel, or distributed. Watch for multiple processors on one machine (parallel) versus multiple networked computers (distributed).
The most common wrong answer treats a task as fully parallelizable, assuming N processors always give an N times speedup or that doubling processors always halves time. Whenever a stem names a sequential portion, that portion is a floor the total time cannot drop below.
Get a free AP CSP question every day
Join 3,000+ students. Daily practice, study tips, and exam strategies.
A weather agency runs one enormous simulation by dividing it across thousands of separate computers in different buildings, all connected over a network, each handling a region of the globe. Which model of computing does this best describe?
A process takes 48 seconds when run sequentially and 12 seconds when run in parallel across several processors. What is the speedup of the parallel solution?
A task takes 100 seconds in total. Of that, 40 seconds must run sequentially and the remaining 60 seconds can be divided evenly across processors. Running on 3 processors, approximately how long does the task take?
A task with a fixed sequential portion is run on more and more processors. As the number of processors grows very large, the total run time approaches a lower bound it never drops below. Which statement best explains why?
Consider these claims about parallel and distributed computing:
- I. In parallel computing, a task is split into parts that run at the same time and the results are combined.
- II. Distributed computing uses multiple computers connected over a network to work on one problem.
- III. With enough processors, any task can reach unlimited speedup.
A task has a 10 second sequential part and a 90 second parallelizable part, currently running on 3 processors. A team wants to lower the total run time as much as possible. Which change would reduce the total time the most?
Parallel Scheduler
Split the work across processors to finish faster. See where parallel computing pays off, and where it hits a wall.
Frequently Asked Questions
🔗 Continue studying
Topic 4.3 is a formula lesson: students who memorize speedup = sequential / parallel and parallel time = sequential part + parallelizable part / processors will bank these points, so drill both with quick numeric warm-ups. Use the Parallel Scheduler game to let them feel the sequential floor firsthand, then debrief why the last few processors barely moved the clock. The Superpack includes a speedup worksheet and a sequential-versus-parallel-versus-distributed sorting activity. View what's included →
Get in Touch
Whether you're a student, parent, or teacher — I'd love to hear from you.
Just want free AP CS resources?
Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.
Message Sent!
Thanks for reaching out. I'll get back to you within 24 hours.
Prefer email? Reach me directly at [email protected]