# Multicore processors

> Computer Science · CIE A-Level 9618
> Source: https://www.owlsprep.com/study/cie-9618-u4-multicore-processors/

This module covers multicore processor architecture, performance benefits, calculation of speedup via Amdahl's Law, and key limitations of multicore designs, all core exam topics for CIE 9618.

**Prerequisites:** [Single core CPU architecture](https://www.owlsprep.com/study/cie-9618-u4-single-core-cpu-architecture/); [Parallel processing basics](https://www.owlsprep.com/study/cie-9618-u4-parallel-processing-intro/)

## Learning objectives

- Distinguish between single-core and multicore processor architectures
- Explain performance benefits of multicore designs for different workloads
- Calculate maximum theoretical speedup using Amdahl's Law
- Evaluate limitations of multicore processor performance

## What is a Multicore Processor?

A multicore processor is a single integrated circuit that contains multiple independent processing units called cores. Each core has its own control unit, ALU, and registers, and most designs share a common cache and system memory bus between all cores on the chip.

**Core** — An independent processing unit on a multicore chip capable of executing instruction streams independently of other cores.

**Worked example:** Explain why a 3GHz quad-core processor does not have a total combined clock speed of 12GHz.

1. The 3GHz rating refers to the maximum clock speed of each individual core, not a combined total
2. Each core operates independently when executing instructions, so their clock speeds do not add together
3. All cores in this quad-core processor can run at a maximum of 3GHz each, not 12GHz total

> **tip**
>
> This is one of the most common common misconceptions tested in multiple-choice questions, remember: clock speeds do not add across cores.

> **Exam tip:** Always be prepared to correct this misconception in written answers

## Performance Benefits of Multicore Designs

Multicore processors improve overall system throughput by enabling parallel execution of instructions. This brings major benefits for two main types of workload:

- **Multitasking**: Multiple independent programs can run on separate cores simultaneously, avoiding the overhead of time-slicing on a single core
- **Parallelizable workloads**: Programs designed to split work into multiple threads (e.g. video editing, 3D rendering) can process tasks across multiple cores to reduce total runtime
- **Power efficiency**: Multicore chips deliver the same throughput as higher-clock single-core chips at lower power and heat output

**Worked example:** A user runs a web browser, word processor, and video editor at the same time. Explain why a 2.5GHz quad-core processor will outperform a 3.5GHz single-core processor of the same generation.

1. Each open application can be assigned to a separate core, so all three can execute instructions simultaneously
2. A single-core processor must time-slice between applications, switching between them and adding significant scheduling overhead
3. Even with a higher clock speed, the sequential execution and switching overhead means the single core cannot match the quad-core's throughput for this workload

## Amdahl's Law for Speedup Calculation

Amdahl's Law is a formula used to calculate the maximum possible speedup of a parallelizable program running on a multicore processor, based on the share of code that can be parallelized.

**Amdahl's Law** — Calculates maximum theoretical speedup $S$, where $p$ = proportion of code that can be parallelized (0 to 1), $n$ = number of cores.

*Notation:* S = \frac{1}{(1-p) + \frac{p}{n}}

**Worked example:** A program has 65% of its code that can be parallelized. Calculate the maximum theoretical speedup when running on an 8-core processor.

1. Convert the parallel percentage to a proportion: $p = 65/100 = 0.65$
2. Calculate the sequential proportion: $1-p = 1 - 0.65 = 0.35$
3. Substitute values into Amdahl's Law:
4. $$S = \frac{1}{0.35 + \frac{0.65}{8}} = \frac{1}{0.35 + 0.08125} = \frac{1}{0.43125} \approx 2.32$$
5. The maximum theoretical speedup is approximately 2.32 times faster than running on a single core.

> **tip**
>
> Always convert percentages to decimals for $p$, using the percentage value directly will give an incorrect result.

*Calculator:* allowed

## Limitations of Multicore Performance

Actual speedup on a multicore processor is almost always lower than the theoretical maximum calculated by Amdahl's Law, due to a range of bottlenecks:

- **Sequential bottleneck**: Any non-parallelizable part of the code limits speedup, even with an infinite number of cores
- **Parallel overhead**: Splitting work into threads, synchronizing results, and communicating between cores adds extra processing overhead
- **Memory contention**: All cores share access to main memory, so simultaneous memory access can cause bottlenecks
- **Software limitations**: Many programs are not designed to use multiple cores, so extra cores give no performance gain

**Worked example:** Explain why adding 100 extra cores to an 8-core processor running a program with 15% sequential code gives very little extra speedup.

1. First calculate speedup for 8 cores: $p = 0.85$, $S = \frac{1}{0.15 + 0.85/8} \approx 4.27$
2. Then calculate speedup for 108 cores: $S = \frac{1}{0.15 + 0.85/108} \approx 6.29$
3. Even though we added 100 extra cores, speedup only increased by ~2, a much smaller gain than expected
4. The 15% sequential section of the code acts as a permanent bottleneck that limits further speedup regardless of how many extra cores are added.

## Common pitfalls

- **Wrong:** Adding clock speeds across cores to get a total clock speed
  - Why it fails: Each core operates independently, so clock speeds do not add together
  - Correct: The advertised clock speed of a multicore chip is the speed of each individual core
- **Wrong:** Assuming more cores always mean faster program execution
  - Why it fails: Non-parallelizable programs can only run on one core, regardless of available cores
  - Correct: Speedup is only achieved for parallel workloads or multitasking of independent programs
- **Wrong:** Using percentage values directly for $p$ in Amdahl's Law
  - Why it fails: Amdahl's formula requires $p$ to be a proportion between 0 and 1
  - Correct: Divide the parallel percentage by 100 to get a decimal before substitution
- **Wrong:** Claiming real-world speedup equals the theoretical value from Amdahl's Law
  - Why it fails: Amdahl's Law does not account for parallel overhead or memory contention
  - Correct: Always state that actual speedup will be lower than the theoretical maximum

## Cheatsheet

| Concept | Key Fact / Formula |
| --- | --- |
| Multicore processor | Multiple independent cores on one CPU chip |
| Core count | Number of simultaneous independent instruction streams |
| Clock speed | Quoted speed = speed per individual core, not total |
| Amdahl's Law | $S = \frac{1}{(1-p) + \frac{p}{n}}$ |
| $p$ (Amdahl's) | Proportion of code that can be parallelized (0 < p < 1) |
| $n$ (Amdahl's) | Number of available cores |
| Max speedup (infinite cores) | $S = 1/(1-p)$ |
| Biggest limitation | Sequential code bottleneck |

## What's next

Multicore architecture is the foundation of all modern computing systems, from personal devices to data centers. Understanding the performance tradeoffs and limits of multicore designs prepares you for more advanced topics in parallel computing and system architecture, which are regularly tested in both Paper 2 and Paper 4 of CIE 9618. The concepts you learned here, especially Amdahl's Law, are also applied to GPU parallel processing and distributed computing topics. Explore the links below to continue building your knowledge for the exam.

- [System software](https://www.owlsprep.com/study/cie-9618-u5-overview/)
- [Operating Systems](https://www.owlsprep.com/study/cie-9618-u5-operating-systems/)
- [Types of system software](https://www.owlsprep.com/study/cie-9618-u5-types-of-system-software/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/cie-9618-u4-multicore-processors/
