Parallel & Distributed Solutions (College Board AP® Computer Science Principles): Study Guide

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Updated on

Benefits and limitations of parallel and distributed computing

Why use parallel or distributed computing?

  • Parallel computing consists of a parallel portion and a sequential portion

  • Solutions that use parallel computing can scale more effectively than solutions that use sequential computing

  • Distributed computing allows problems to be solved that could not be solved on a single computer because of either the processing time or storage needs involved

  • Distributed computing allows much larger problems to be solved quicker than they could be solved using a single computer

Comparing parallel and distributed computing

Feature

Parallel computing

Distributed computing

What it does

Splits a program into operations that run simultaneously on multiple processors within a system

Uses multiple devices to run a program

Why it is used

Completes tasks faster by performing operations at the same time

Solves problems too large for a single computer's processing time or storage

Scaling

Scales more effectively than sequential computing

Enables problems to be solved that a single computer cannot handle at all

Efficiency limitations

What limits the efficiency of parallel computing?

  • When increasing the use of parallel computing in a solution, the efficiency of the solution is still limited by the sequential portion

  • This means that at some point, adding parallel portions will no longer meaningfully increase efficiency

  • Every parallel solution has tasks that must run sequentially (e.g. initializing data before processing, or combining results after processing)

  • The sequential portion sets a minimum time that the solution cannot go below, regardless of how many processors are added

Examiner Tips and Tricks

  • The AP exam may describe a scenario where adding more processors does not significantly reduce the total time. The reason is always the sequential portion.

  • If a question asks why doubling the number of processors does not halve the execution time, the answer relates to the sequential tasks that cannot be parallelized. Remember that distributed computing is specifically about using multiple devices, not just multiple processors within one machine.

Worked Example

A company uses a sequential computing solution that takes 200 seconds to process a large dataset. The company switches to a parallel computing solution that reduces the processing time to 60 seconds. A programmer suggests adding more processors to further reduce the time. However, 30 seconds of the solution must always run sequentially.

Which of the following best explains why adding more processors will NOT reduce the time below 30 seconds?

(A) Parallel computing cannot process large datasets

(B) Adding processors increases the sequential portion of the solution

(C) The efficiency of the solution is limited by the sequential portion, which cannot be parallelized

(D) Distributed computing must be used instead of parallel computing for further improvement

[1]

Answer:

(C) The efficiency of the solution is limited by the sequential portion, which cannot be parallelized [1 mark]

  • The sequential portion sets a minimum execution time that cannot be reduced by adding more processors, so the solution can never complete in less than 30 seconds.

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Reviewer: James Woodhouse

Expertise: Computer Science & English Subject Lead

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.