Why might a program with 4 threads not run 4 times faster on 4 cores?
- Some parts must run in sequence.
- Threads must coordinate and share resources.
- Overheads reduce the speed-up.
Answer Sequential parts and coordination overheads limit the speed-up
A-level Computer Science revision · Data structures and algorithms
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.
Watch out Some steps depend on earlier results, so they cannot run in parallel.
Why might a program with 4 threads not run 4 times faster on 4 cores?
Answer Sequential parts and coordination overheads limit the speed-up
What is concurrent processing?
Which problem suits parallel processing best?
Give one difficulty of concurrent processing.
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
£119 once
Price rises to £199 on 1 January. Save £80 by joining before then.
At least 12 months of access
No VAT is charged.