A-level Computer Science revision · Data structures and algorithms

Concurrent and parallel processing

The idea

Concurrent processing makes progress on several tasks over the same period, often by switching between them. Parallel processing runs tasks at the same time on multiple processors. Not all problems can be parallelised, and processes may need synchronisation. Pipelining splits a task into stages and overlaps them, so several items are at different stages at once.

  1. Identify parts of the problem that are independent.
  2. Parallel: faster, but overheads and coordination.
  3. Concurrency: more responsive, but shared resources need control.

Watch out Some steps depend on earlier results, so they cannot run in parallel.

See it worked

Worked example

Why might a program with 4 threads not run 4 times faster on 4 cores?

  1. Some parts must run in sequence.
  2. Threads must coordinate and share resources.
  3. Overheads reduce the speed-up.

Answer Sequential parts and coordination overheads limit the speed-up

Your turn

Question 11 mark

What is concurrent processing?

Choose one
Question 21 mark

Which problem suits parallel processing best?

Choose one
Question 32 marks

Give one difficulty of concurrent processing.

Write your answer, then see a model answer
  1. Name the difficulty.
  2. Explain it.

Answer Processes sharing data may interfere, so synchronisation is needed to avoid race conditions; but locking can itself cause deadlock.

A-level Computer Science Pro, OCR H446

A-level Computer Science Pro

£119 once

Price rises to £199 on 1 January. Save £80 by joining before then.

At least 12 months of access

By paying you agree to our Terms and get access straight away, which ends your 14-day cancellation right.

No VAT is charged.

Independent practice for OCR A-level Computer Science (H446), not endorsed by OCR.

Privacy · Terms