Hardware

Hardware

CPU performance and embedded systems

Computer Architecture Paper 1 10 min read

On this page
  1. In this note
  2. What you should already know
  3. What makes a CPU faster
  4. Instruction sets
  5. Embedded systems
  6. Summary
  7. Ways they test it
  8. What the examiner looks for
  9. Past-paper questions, solved
  10. Common mistakes
  11. Practice
  12. Can I do this?
  13. Quiz

In this note

Syllabus 3.1 Computer architecture
  • 3.1.3Understand what is meant by a core, cache and clock in a CPU and explain how they can affect the performance of a CPU.
  • 3.1.4Understand the purpose and use of an instruction set for a CPU.
  • 3.1.5Describe the purpose and characteristics of an embedded system and identify devices in which they are commonly used.

Before this: The fetch-decode-execute cycle. Next: Input and output devices.

Part 1Learn the topic

The notes: every idea from the start, with our own examples.

What you should already know

The FDE cycle

The CPU fetches, decodes and executes one instruction, then repeats.

Quick check: what does a faster CPU let you do?

Run more fetch-decode-execute cycles every second.

What makes a CPU faster

Three features of a CPU decide how many instructions it can process per second. For each one, learn what it is and how it affects performance: the examiner almost always wants the link to FDE cycles.

FeatureWhat it isEffect on performance
Clocksends out timing signals (clock pulses) that keep the parts of the CPU in step. Clock speed is measured in hertz: 3.5 GHz = 3.5 billion cycles per secondhigher clock speed → more FDE cycles per second → instructions processed faster
Corea complete processing unit (with its own ALU, CU and registers). A quad-core CPU has fourmore cores → more instructions processed at the same time (each core runs its own FDE cycle simultaneously)
Cachesmall, very fast memory inside / next to the CPU that stores frequently used data and instructions (levels L1, L2, L3)bigger cache → frequently used data is accessed faster than from RAM → less waiting
Not always. Doubling the cores does not always double the speed: the program must be able to split its work between cores, and the cores have to communicate. Very high clock speeds also make the CPU hot. If the question says "explain", one sentence on a limit can earn the extra mark.

Example Comparing two CPUs

CPU A: 4 cores, 3.2 GHz, 8 MB cache. CPU B: 2 cores, 3.6 GHz, 4 MB cache. Which is likely to perform better on a program that can use many cores, and why?

  1. CPU A has twice as many cores, so it can run twice as many FDE cycles at the same time.
  2. CPU A also has a bigger cache, so more frequently used data is stored close to the CPU and accessed faster than from RAM.
  3. CPU B has the faster clock (more cycles per second per core), but 3.6 is only 12.5% more than 3.2.

Answer CPU A: more cores and more cache outweigh the slightly lower clock speed.

Instruction sets

An instruction set is the list of all the commands (machine code instructions) that a particular CPU can process. Each command is made of an opcode (the operation, e.g. ADD, LOAD, JUMP) and usually an operand (the data or address it works on).

The control unit uses the instruction set to decode each instruction in the FDE cycle. A program written in a high-level language must be translated into instructions from the CPU's instruction set before it can run, which is why machine code made for one type of CPU will not run on another.

Instruction set: a list of all the commands that can be processed by a CPU, used to decode instructions.

Embedded systems

An embedded system is a computer system built into a larger device to perform one dedicated function. It has a microprocessor (or microcontroller), and its program is stored as firmware in ROM, so it usually cannot be reprogrammed by the user.

CharacteristicWhy
performs a single, dedicated functionit only controls one device: e.g. keeping a freezer cold
built into a larger deviceit is part of the machine, not a separate computer
has dedicated hardware + a microprocessoronly the parts needed for its job
runs firmware / cannot (easily) be reprogrammedthe program is fixed in ROM
small, cheap, low powereasy to mass-produce; can run on batteries
often real-time and automaticreacts to sensor input without a user

Devices that commonly contain embedded systems:

DomesticTransport / other
washing machine, microwave oven, fridge / freezer, central heating, security alarm, smart TVcar engine management, ABS brakes, traffic lights, vending machine, digital camera, lift (elevator), set-top box
A general-purpose computer (a laptop) can run any program you install. An embedded system does one job inside another device. If the question asks you to "identify" embedded systems from a list, cross out the laptops, PCs and servers.

Try it yourself

1
What is the effect of a higher clock speed?
Show answer

Answer More FDE cycles per second, so instructions are processed faster

2
Where is the program of an embedded system stored?
Show answer

Answer In ROM, as firmware

3
Is a smartphone an embedded system?
Show answer

Answer No: it is general purpose (it runs many apps)

Summary

  • Clock: timing signals; higher clock speed = more FDE cycles per second.
  • Core: a processing unit; more cores = more instructions processed at the same time.
  • Cache: fast memory for frequently used data; bigger cache = faster access than RAM.
  • Instruction set: list of all the machine code commands a CPU can process; used to decode.
  • Embedded system: one dedicated function, built into a larger device, microprocessor, firmware, cannot be reprogrammed.

If you see …

  • "explain how the cores affect performance"more cores · more FDE cycles at the same time · simultaneously
  • "characteristics of an embedded system"dedicated function · built into a device · firmware · cannot be reprogrammed · small / low power
Part 2How it is examined

Question types, what the examiner gives marks for, and real past-paper questions solved.

Ways they test it

Type 1 Effect on performance

"Explain how the number of cores / cache / clock speed can affect performance" [2] each

Spot it "explain".

  1. Two marks: what it is + the effect, linked to FDE cycles.

Type 2 Interpret a spec

"The CPU has a clock speed of 3.5 GHz. Explain what this means" [1]

Spot it a number.

  1. 3.5 billion FDE cycles (clock pulses) per second.

Type 3 Instruction set

"State what is meant by an instruction set" [1]

Spot it "instruction set".

  1. A list of all the commands that can be processed by the CPU.

Type 4 Embedded system

"Describe two characteristics of an embedded system" [4]; "circle three embedded systems" [3]

Spot it a device scenario.

  1. Two marks per characteristic: state it, then expand it.

What the examiner looks for

"Explain how these three components can affect the performance of the CPU" (cores, clock, cache) [6]

Marking points (one mark each, up to the marks shown)

  • More cores … more FDE cycles can be performed at the same time / simultaneously
  • Higher clock speed … more FDE cycles can be performed per second
  • Bigger cache … more frequently used data / instructions can be stored … and accessed faster than from RAM

Keywords FDE cycles simultaneously per second frequently used faster than RAM

Too vague "more cores make the computer faster" with no reason; "cache stores data" (all memory does: say which data and why it helps)

Past-paper questions, solved

0478/12/F/M/24 Q2Paper 1 · Computer systems6 marksFull size
Clock speed, cores and cache of a computer's CPU

How to start One point per mark: what the number means, then the effect of each feature, linked to FDE cycles.

Show a full-mark answer and the mark scheme

(i) The CPU can perform 3.5 billion fetch-decode-execute cycles every second.

(ii) Each core can perform its own FDE cycle, so several instructions are processed at the same time.

(iii) The cache stores frequently used data and instructions, which can be accessed faster than from RAM.

PartAnswer / workingMarksGuidance
2(b)(i)3.5 billion FDE cycles / clock pulses per secondB1
2(b)(ii)each core performs an FDE cycle · simultaneously / more instructions at onceB2
2(b)(iii)stores frequently used data / instructions · accessed faster than RAMB2
Total: 5 marks
2210/12/O/N/23 Q4Paper 1 · Computer systems4 marksFull size
Characteristics of an embedded system

How to start Pick characteristics from the list and expand each one with a reason or example.

Show a full-mark answer and the mark scheme

It performs a single, dedicated function, for example only controlling the security light. It is built into a larger device and its program is stored as firmware, so it cannot be reprogrammed by the user. It uses little power and is small and cheap to make.

PartAnswer / workingMarksGuidance
4Any two characteristics, two marks each: dedicated function · microprocessor · dedicated hardware · firmware · built into a larger device · cannot be reprogrammed · low power · small / cheap · real-timeB4
Total: 4 marks

Common mistakes

  • ✗ "Cache is extra storage"✓ "Cache is fast memory for frequently used data, accessed faster than RAM"
  • ✗ "More cores = computer goes faster"✓ "More cores = more FDE cycles at the same time"Say the reason.
  • ✗ "Clock speed is the time of the computer"✓ "Clock speed = number of FDE cycles per second"
  • ✗ "An embedded system can be reprogrammed by the user"✓ "Its firmware is fixed; it usually cannot be reprogrammed"

Practice

Practice: easy, medium, hard

Easy

1
A CPU has a clock speed of 2 GHz. How many cycles is that per second?
Show answer

Answer 2 billion

2
Give two devices that contain an embedded system.
Show answer

Answer e.g. washing machine, microwave

3
What is a core?
Show answer

Answer A processing unit inside the CPU that can run its own FDE cycle

Medium

1
Explain how increasing the cache size can improve performance. [2]
Show answer

Answer More frequently used data / instructions stored in cache; accessed faster than from RAM

2
State what is meant by an instruction set.
Show answer

Answer A list of all the commands a CPU can process

Hard

1
A quad-core CPU is replaced by an eight-core CPU but a program does not run faster. Suggest why. [2]
Show answer

Answer The program may not be able to split its work across more cores / it uses one core; cores must communicate

2
Explain why an embedded system usually cannot be reprogrammed. [2]
Show answer

Answer Its program is firmware stored in ROM; it is designed for one dedicated function

Can I do this?

Anything unticked: revise that section first. All ticked: take the quiz.

Quiz

The multiple-choice and guided questions need JavaScript. The concept checks and exam practice below work without it.

Your progress on this note is saved when JavaScript is on.

⬇️ Download this chapter as a PDF: Full notes