J277 2: CPU Performance and Embedded Systems

OCR GCSE COMPUTER SCIENCE · J277 · PAPER 1

CPU performance and embedded systems

Why some processors are faster than others, and the hidden computers inside everyday devices.

Paper 1 · Lesson 2

1 / 22
volgende
Slide 1: Slide
newEditorComputer ScienceUpper Secondary (Key Stage 4)GCSE

In deze les zitten 22 slides, met interactieve quizzen en tekstslides.

time-iconLesduur is: 60 min
Dit is niet oké

Introductie

OCR GCSE Computer Science (J277), Paper 1, lesson 2 of 26. Students learn how clock speed, cache size and the number of cores affect CPU performance, work out cycles per second from a clock speed in GHz, and explain why doubling the number of cores does not double the speed. They then meet embedded systems: what they are, their typical features and everyday examples, finishing with an exam-style question and mark scheme. This lesson was created with AI assistance.

Onderdelen in deze les

OCR GCSE COMPUTER SCIENCE · J277 · PAPER 1

CPU performance and embedded systems

Why some processors are faster than others, and the hidden computers inside everyday devices.

Paper 1 · Lesson 2

J277 1.1 Systems architecture, second lesson: performance and embedded systems. Ask: if two laptops look the same, how could one be faster?

Device-free: show the cover on the board.

Cover photo: He Junhui / Unsplash, shown as a hologram.

01 · LEARN · MISSION BRIEFING

By the end of this lesson you can…

01

Explain how clock speed, cache size and number of cores affect performance

02

Explain why doubling the cores does not double the speed

03

Describe what an embedded system is and give examples

SYSTEM VOICE

System online. Today's mission: find out what makes one CPU faster than another, then track down the hidden computers inside everyday devices.

Play the system voice, then read the three outcomes aloud.

Voice script: "System online. Today's mission: find out what makes one CPU faster than another, then track down the hidden computers inside everyday devices."

Device-free: read the briefing aloud; students copy the outcomes as headings.

02 · CHECK · DO NOW

Four quick questions from last lesson

1  What does the PC hold?

The address of the next instruction to be fetched.

2  What does the ALU do?

Arithmetic calculations and logic operations, such as comparisons.

3  Which register holds the data or instruction fetched from memory?

The MDR (memory data register).

4  What is cache?

Small, very fast memory in the CPU for frequently used data and instructions.

Retrieval from lesson 1. Give three minutes to write answers, then click four times to reveal each answer.

1 The PC holds the address of the next instruction to be fetched (not the instruction itself). 2 The ALU does arithmetic and logic operations, such as adding and comparing. 3 The MDR. 4 Cache is a small amount of very fast memory in the CPU that holds frequently used data and instructions.

Question 4 leads straight into today: cache size is one of the three performance factors.

Device-free: students answer on mini whiteboards or in books.

Recap of lesson 1: which register holds the data or instruction just fetched from memory?

A

PC

B

Accumulator

C

MDR

D

MAR

Answer: MDR (memory data register). The MAR holds the address; the MDR holds what was found at that address.

If many choose MAR, go back to the fetch diagram from lesson 1 before moving on.

Device-free: students hold up A, B, C or D cards. Image credit: Brian Kostiuk / Unsplash

01 · LEARN · PERFORMANCE

Three things make a CPU faster

Clock speed: how many cycles it does each second.

Cache size: how much fast memory it keeps close by.

Number of cores: how many processing units work at once.

The three common CPU characteristics named in the OCR J277 specification. Each gets its own section next.

Ask: which of these have students seen on an advert for a laptop or phone? (Usually GHz and "octa-core".)

Device-free: students write the three factors as three column headings. Image credit: MJH SHIKDER / Unsplash

01 · LEARN · CLOCK SPEED

Clock speed sets the pace

The clock speed is how many fetch–execute cycles the CPU can carry out each second.

Measured in hertz (Hz): 1 Hz = 1 cycle per second.

Higher clock speed = more instructions processed per second, so programs run faster.

But a faster clock makes more heat and uses more power.

SYSTEM VOICE · KEY DEFINITION

Clock speed. The number of fetch–execute cycles a CPU can carry out each second, measured in hertz. 3.2 GHz means 3.2 billion cycles every second.

Play the system voice for the definition.

Voice script: "Clock speed. The number of fetch-execute cycles a CPU can carry out each second, measured in hertz. Three point two gigahertz means three point two billion cycles every second."

Inside the CPU a clock sends out regular pulses; each pulse moves the work on. A higher clock speed means more cycles, so more instructions every second.

Misconception: clock speed is not the speed of the internet connection or how fast data downloads. Running a CPU faster than its rated speed is called overclocking; it produces extra heat and needs better cooling.

Device-free: students copy the definition and the trade-off (faster but hotter).

01 · LEARN · WORKED EXAMPLE

From GHz to cycles per second

▮ TERMINAL // clock_calc

1  1 kHz = 1 000 cycles per second

2  1 MHz = 1 000 000 cycles per second

3  1 GHz = 1 000 000 000 cycles per second

4  Q 2.5 GHz = ? cycles per second

5  > 2.5 × 1 000 000 000 = 2 500 000 000

6  Q cycles in 0.2 seconds at 2.5 GHz?

7  > 2 500 000 000 × 0.2 = 500 000 000

Kilo, mega, giga

Each step up is × 1 000.

Giga = one billion (1 000 000 000).

Click to reveal each answer. Predict it first.

Click twice. Ask students to predict each answer on mini whiteboards before revealing.

2.5 GHz = 2.5 × 1 000 000 000 = 2 500 000 000 cycles per second (two and a half billion). In 0.2 seconds: 2 500 000 000 × 0.2 = 500 000 000 cycles (five hundred million).

Check: 0.2 is one fifth, and 2.5 billion divided by 5 is 0.5 billion = 500 million.

Extension: a 4 GHz CPU against a 2 GHz CPU: twice as many cycles per second, if everything else is equal.

Device-free: copy the conversions and work through the two questions in books.

CPU A runs at 2.4 GHz and CPU B at 3.6 GHz. Which statement is true?

A

CPU B must have more cores

B

CPU A carries out more cycles per second

C

CPU B must have a bigger cache

D

CPU B carries out more cycles per second

Answer: CPU B carries out more cycles per second (3.6 billion against 2.4 billion).

The clock speed says nothing about the number of cores or the cache size; those are separate characteristics.

Device-free: students hold up A, B, C or D cards. Image credit: Bermix Studio / Unsplash

01 · LEARN · CACHE SIZE

Bigger cache, fewer slow trips to RAM

What cache does

Cache is very fast memory in the CPU. It keeps copies of data and instructions the CPU uses often.

Reading from cache is much faster than reading from RAM, which is further away.

Why a bigger cache helps

More data and instructions fit in the cache, so the CPU has to fetch from slower RAM less often and spends less time waiting.

But cache is expensive, so it stays small (a few megabytes, against gigabytes of RAM).

Analogy: cache is the books on your desk; RAM is the library down the corridor. A bigger desk means fewer trips to the library.

Extra detail if students ask: many CPUs have levels of cache. Level 1 is the smallest and fastest, level 2 and level 3 are larger but a little slower. Not required by J277, but it shows why size and speed trade off.

Misconception: cache is not the same as secondary storage, and it does not keep data when the power is off.

Device-free: students complete the sentence "A bigger cache improves performance because…".

01 · LEARN · CORES

More cores, more work at the same time

A core is a processing unit that can fetch, decode and execute instructions on its own.

A dual-core CPU has 2 cores, a quad-core 4. More cores can process more instructions at the same time.

Say: each core is like a separate CPU on the same chip. With several cores, different programs, or different parts of one program, can be processed at the same time.

Useful example: streaming music, running a game and a voice chat at once is smoother on a multi-core CPU.

Device-free: students add a definition of "core" to their notes. Image credit: Winston Chen / Unsplash

01 · LEARN · THE CATCH

Double the cores is not double the speed

Aisha upgrades from 4 cores to 8. Her game does not run twice as fast. Why not?

1 · Not every task can be split

Some steps need the result of the step before, so they must run one after another on one core.

2 · Software must be written for it

A program only uses extra cores if it was designed to share its work between them.

3 · Cores must coordinate

Cores have to share out work, pass data between them and share memory. That takes time.

Ask the class for ideas first, then click to reveal the three reasons.

Analogy: one person can make a cup of tea in about four minutes. Four people cannot make it in one minute: the kettle still has to boil before the water can be poured. Some steps have to wait for others.

Exam phrasing: "not all tasks can be run in parallel", "software may not be written to use multiple cores", "cores need to communicate and share resources, which adds overhead".

Device-free: students write the three reasons with one example each.

Sort each statement under the factor it describes.

CLOCK SPEED

CACHE SIZE

NUMBER OF CORES




Fewer slow trips to RAM

Measured in GHz

Only helps if software can split the work

Runs several instructions at once

Keeps frequently used instructions close

More cycles every second

Answers. Clock speed: measured in GHz; more cycles every second. Cache size: fewer slow trips to RAM; keeps frequently used instructions close. Number of cores: runs several instructions at once; only helps if software can split the work.

Device-free: students draw the three columns and write each statement in the right one.

03 · DEBUG · SPOT THE MISTAKE

One of Jamie's claims is wrong

▮ TERMINAL // cpu_compare.txt

CPU X  4 cores · 3.0 GHz · 8 MB cache

CPU Y  8 cores · 3.0 GHz · 8 MB cache

1  Y can process more instructions at once.

2  Y will run every program twice as fast.

3  Each core does 3 billion cycles a second.

4  More cache would cut trips to RAM.

Decide which claim is wrong and why. Then tap the marker.

Exam tip: "always" and "every" are warning words in a claim about performance.

Pairs decide, then tap the marker.

Claim 2 is wrong: doubling the cores does not double the speed of every program (tasks that cannot be split, software not written for many cores, time spent coordinating). Claim 1 is correct: more cores can process more instructions at the same time. Claim 3 is correct: 3.0 GHz = 3 000 000 000 cycles per second, per core. Claim 4 is correct: a bigger cache holds more, so fewer trips to RAM are needed.

Device-free: read the specs and claims aloud; students write the number of the wrong claim and a reason.

01 · LEARN · EMBEDDED SYSTEMS

Computers hidden inside other devices

An embedded system is a computer system built into a larger device, with one dedicated function.

Often it is one small chip, like this one.

SYSTEM VOICE · KEY DEFINITION

Embedded system. A computer system built into a larger device, with one dedicated job.

Play the system voice for the definition.

Voice script: "Embedded system. A computer system built into a larger device, with one dedicated job."

The photo shows a microcontroller: a processor, memory and input/output on one chip. Many embedded systems are built around a chip like this.

Ask: how many embedded systems did you use before school today? (Alarm clock, kettle, microwave, central heating, bus ticket machine, traffic lights…)

Device-free: students write the definition and list three devices from their morning. Image credit: Vishnu Mohanan / Unsplash

01 · LEARN · EMBEDDED SYSTEMS

Everyday examples and typical features

Examples

  • Washing machine and dishwasher

  • Microwave oven

  • Central heating thermostat

  • Car engine management and ABS brakes

  • Traffic lights

  • Fitness tracker and digital camera

Typical features

  • One dedicated job, not general-purpose

  • Small, low power and cheap to make in large numbers

  • Very reliable: it may run for years without a restart

  • Program stored in ROM or flash memory and rarely changed by the user

Not embedded: a laptop, desktop PC or smartphone is general-purpose. It runs whatever software you install.

Go through the examples and ask for more from the class.

Contrast: a general-purpose computer (laptop, desktop, smartphone) is designed to run many different programs chosen by the user. An embedded system does one job; its software (often called firmware) is fixed by the manufacturer, although some can receive updates.

Note for discussion: a smartphone itself is general-purpose, but it contains embedded systems, for example the chip that controls the camera.

Device-free: students make a two-column table: embedded, general-purpose.

Why is the computer in a washing machine an embedded system?

A

It has a fast multi-core CPU

B

It does one dedicated job inside a larger device

C

Users can install any software on it

D

It has no processor at all

Answer: it does one dedicated job inside a larger device.

Why the others are wrong: embedded systems usually have small, low-power processors; the user cannot install new software; and every embedded system has a processor, otherwise it would not be a computer system.

Device-free: students write the letter and one reason. Image credit: Limi change / Unsplash

1

The CPU checks the cache for the data

2

A copy of the data is kept in the cache

3

The data is fetched from RAM, which is slower

4

The data is not in the cache: a cache miss

5

Next time, the data is read straight from the cache: a cache hit

The CPU needs some data. Put the steps in order.

Correct order: check the cache; cache miss; fetch from RAM; keep a copy in the cache; next time a cache hit.

Point out why a bigger cache helps: more data can be kept close to the CPU, so more requests are cache hits and the CPU waits less.

Device-free: students write the five steps on sticky notes and order them on the desk.

Complete the summary.

Clock speed is measured in hertz. A 3 GHz CPU carries out 3 billion cycles every second. A larger cache means fewer trips to slower RAM. A CPU with more cores can process several instructions at the same time. An embedded system is built into a larger device and has a dedicated function.

hertz
billion
cache
cores
embedded
dedicated
bytes
million
general-purpose

Answers in order: hertz, billion, cache, cores, embedded, dedicated. Distractors: bytes, million, general-purpose.

If students choose million: 1 GHz = 1 000 000 000 cycles per second, which is one billion. Mega (MHz) is million.

Device-free: write the paragraph on the board with gaps; students fill them in their books.

Exam practice: a shop tells Ella that doubling the number of cores in her computer will make it run twice as fast. Explain why this may not be true. [3 marks]

Give five minutes. "Explain" means give a point and a reason.

Mark scheme (1 mark each, max 3): Not all tasks or programs can be split into parts that run at the same time (in parallel). Some instructions depend on the result of earlier ones, so they must run in order. Software has to be written to use multiple cores. Cores need to communicate and coordinate, which takes time (overhead). Cores share resources such as cache or RAM, which can limit the gain.

Do not accept: "it depends on the computer" with no reason.

Device-free: students answer in books; model answer on the next slide.

04 · EXAM · MODEL ANSWER

What a 3-mark answer looks like

Not all programs can be split into tasks that run at the same time on different cores (1), because some instructions need the result of earlier ones.

The software must be written to use more cores, or the extra cores sit idle (1).

The cores also have to share out the work and pass data between them, which takes time (1).

Examiner checklist

Three separate reasons, not one reason said three ways.

Uses the words parallel, software or coordinate.

Avoids vague answers like "it might be slower".

Click once for the model answer and once for the checklist. Students mark their own answers in a different colour, one mark per pink (1).

Common lost mark: repeating "it won't be twice as fast" as if it were a reason.

Device-free: read the model answer aloud; students tick matching points.

1

I can explain all three factors and embedded systems

2

I can explain clock speed and cores

3

I am still unsure about cache

4

I need to go over embedded systems

Where are you now?

Exit check. Use the results to plan a five-minute recap at the start of lesson 3.

Device-free: students write a number 1–4 on a sticky note on the way out.

04 · EXAM · KEEP GOING

Keep going

Isaac Computer Science

Free GCSE topic pages and questions. Search for "CPU performance" and "embedded systems".

BBC Bitesize

GCSE Computer Science, OCR: read the systems architecture pages, then try the test.

OCR past papers

J277/01 Computer systems: find the questions on CPU performance and check them against the mark scheme.

Next lesson: memory and storage: RAM, ROM, virtual memory and the drives that keep your files.

Homework idea: find the clock speed, number of cores and cache size of a computer or phone at home (in its settings or on the manufacturer's website) and say which factor matters most for what it is used for.

Device-free: write the three resources on the board.