6m left·0%
Reading Time: 6 min
Last Updated: March 23, 2026
Main Ideas: 5
Reading Time: 6 min
Last Updated: March 23, 2026
Main Ideas: 5

Topic 4.3 Notes – Parallel and Distributed Computing

Verified for 2027 AP® Computer Science Principles Exam
Read aloud
Topic 4.3 is about how programs run tasks: one at a time, at the same time on one machine, or across many machines. You’ll compare sequential, parallel, and distributed computing, calculate execution time, and understand why adding more processors doesn’t give unlimited speed.

1. Sequential, Parallel, and Distributed Computing

Computational models describe how a program’s tasks are executed.

Sequential Computing

Sequential computing means instructions run one at a time, in order.

  • Each step waits for the previous one to finish.
  • Total time = sum of all steps.
  • Limited by the speed of a single processor.

If a program has steps that take 3, 5, and 7 seconds, total time is 3 + 5 + 7 = 15 seconds.

Simple. Predictable. No overlap.

Parallel Computing

Parallel computing splits a program into smaller sequential tasks, and some of those tasks run at the same time.

  • Uses multiple cores/processors on one machine.
  • Has two parts:
    • A sequential portion (must stay in order)
    • A parallel portion (independent tasks)

The diagram below contrasts a fully sequential process with one where part of the work branches into parallel tasks before merging again.

Study guide illustration

Sequential vs. parallel process flow

Not every step can be parallelized. If Step B needs the result of Step A, they must stay sequential.

Distributed Computing

Distributed computing uses multiple devices (separate computers) to run a program.

  • Devices may be in different locations.
  • They communicate over a network.
  • Each device handles part of the problem.

Used when:

  • The problem is too big for one computer’s processing power
  • The problem requires more storage than one machine has

Think large search engines or massive data analysis systems.

Quick Comparison

Feature Sequential Parallel Distributed
Number of processors One Multiple cores (same machine) Multiple computers
Task execution One at a time Some simultaneous Simultaneous across devices
Total time depends on Sum of all steps Sequential part + longest parallel path Workload + communication time
Used for Smaller problems Faster processing Very large-scale problems

2. How Execution Time Is Calculated

Sequential Execution Time

Add every step together.

If steps are 4, 6, and 10 seconds:

Total = 4 + 6 + 10 = 20 seconds

If a step depends on a previous result, it must remain sequential.

Parallel Execution Time

Parallel time depends on two things:

  1. Any required sequential steps
  2. The longest-running parallel workload

Rule to remember:

Parallel Time=Sequential Time+Longest Parallel Task \text{Parallel Time} = \text{Sequential Time} + \text{Longest Parallel Task}

Even if some processors finish early, the program ends when the slowest active processor finishes.

How to approach AP-style problems

  1. Identify required sequential steps.
  2. Identify independent tasks.
  3. Distribute tasks across processors.
  4. Find which processor has the most total work.
  5. Add required sequential time.

Students often miss this: the answer is not the average time. It’s controlled by the processor that finishes last.

3. Speedup and Efficiency

Efficiency compares time to complete the same task.

Shorter time = more efficient.

Speedup Formula

Speedup=Sequential TimeParallel Time \text{Speedup} = \frac{\text{Sequential Time}}{\text{Parallel Time}}

If sequential time is 24 seconds and parallel time is 8 seconds:

Speedup = 24 / 8 = 3

That means the parallel solution is three times faster.

If speedup = 1, there was no improvement.

On multiple-choice questions, watch for students accidentally flipping the fraction. Sequential time always goes on top.

4. Limits, Scaling, and Tradeoffs

The Sequential Bottleneck

Every parallel program still has a sequential portion.

That portion limits the maximum speed.

If 20% of a program must stay sequential, adding more processors will eventually stop helping. At some point, processors sit idle waiting.

This ceiling effect shows up often in conceptual questions.

Scalability

Scalability means how well a solution handles increasing workload.

  • Sequential systems must handle everything alone.
  • Parallel systems can add more processors.
  • Distributed systems can add more machines.

Parallel and distributed systems usually scale better, but improvement slows when:

  • The sequential portion dominates.
  • Communication between processors/devices adds overhead.

Distributed systems also introduce complexity. Devices must coordinate and exchange data, which takes time.

5. Benefits and Challenges

Benefits

  • Faster processing of large datasets
  • Can solve problems too large for one computer
  • Increased storage and computing capacity
  • Better handling of growth in workload

Challenges

  • Sequential bottlenecks
  • Communication overhead
  • Coordination complexity
  • Some problems simply cannot be divided efficiently

Remember the core distinction:

  • Sequential = one processor
  • Parallel = one machine, multiple cores
  • Distributed = multiple machines

Key Takeaways

A sequential solution takes the sum of all step times.
A parallel solution takes sequential time + the longest parallel workload, not the average.
The processor with the most assigned work determines total runtime.
Speedup = sequential time divided by parallel time.
Adding processors does not remove the sequential bottleneck.
Distributed computing allows problems to be solved that exceed one computer’s processing or storage limits.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse this website.

Notes

1 credit used · 5/5 remaining