Parallel & Distributed Computing | AP CSP Daily Practice Day 13

Big Idea 4: Computing Systems and Networks
Day 13 Practice - AP CSP Daily Question
[FOCUS] Parallel and Distributed Computing

Practice Question

A program needs to process 1000 images. Processing each image takes exactly 2 seconds when done sequentially. A programmer decides to use parallel computing with 4 processors, where each processor handles 250 images.
Assuming there is no overhead for distributing tasks, what is the minimum time needed to process all images?
What This Tests: Big Idea 4 covers parallel computing concepts including speedup calculations when tasks are distributed across multiple processors.

Why B is Correct

Let us work through this step by step:

  • Sequential time: 1000 images x 2 seconds = 2000 seconds total
  • With 4 processors: Each handles 250 images
  • Time per processor: 250 images x 2 seconds = 500 seconds
  • All processors work simultaneously, so total time = 500 seconds

The speedup is 2000/500 = 4x, which matches having 4 processors (ideal speedup with no overhead).

Common Mistakes

Mistake: Multiplying instead of dividing

Some students multiply the sequential time by the number of processors (2000 x 4 = 8000). Remember: more processors means LESS time, not more.

Mistake: Forgetting that processors work simultaneously

The answer is NOT 250 + 250 + 250 + 250. All four processors work at the same time, so you take the time of the slowest one (they are all equal here at 500 seconds).

[TIP] AP Exam Strategy

For parallel computing problems: (1) Calculate sequential time, (2) Divide work evenly among processors, (3) Calculate time for one processor, (4) That is your answer (assuming no overhead). Speedup = Sequential Time / Parallel Time.

Need Extra Help with AP CSP?

Get personalized tutoring from an experienced AP Computer Science teacher.

Book a Session More Practice
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.