Study Guide
CPU Performance and Embedded Systems
How the number of cores, the size of the cache and the speed of the clock affect how fast a CPU works, and why each has limits; what an instruction set is; and how an embedded system differs from a general-purpose computer.
Lesson 3.3 Computer Systems
For: Cambridge IGCSE Computer Science learners
Stage: Think
One cook or four?
Two school kitchens (made-up ones) each have to prepare 600 lunches. Kitchen A has one cook. Kitchen B has four cooks, and each can work from the recipe folder on their own.
Think it through
Kitchen B will almost certainly finish sooner. Will it finish exactly four times as fast? Give two reasons why it might not.
- Hint 1: What if one dish cannot be started until another is finished?
- Hint 2: What if all four cooks need the same oven at once?
Show what happens
Probably not. Some jobs must wait for others (the sauce cannot be poured until it has been made), and the cooks may need to share things such as the oven, so some of their time is spent waiting. A computer’s processor has the same problem.
A core is a complete processing unit inside a CPU: it has its own control unit, ALU and registers, so it can fetch, decode and execute instructions by itself. A CPU with two cores is called dual-core, with four cores quad-core, and so on. Each core can work on a different instruction at the same time, so a multi-core CPU can run several programs, or several parts of one program, together.
More cores usually help, but only when there is separate work for them to do. The program has to be written so that its work can be split into parts that can run at the same time, and some work has to wait for the results of other work. So doubling the number of cores does not normally double the speed.
Check your understanding
Show the answer
Answer: B. It gains little, because each step waits for the one before, so the extra cores have nothing to do at once.
More cores help only with work that can be shared out.
Stage: Discover
The beat the CPU works to
In the made-up kitchen, a metronome ticks on the wall. On every tick, each cook completes one small action: crack an egg, stir once, turn a page.
Think it through
The kitchen manager speeds the metronome up. What do you expect to happen to the number of lunches made each hour? What might go wrong if the beat is made faster and faster?
- Hint 1: Think about what the cooks can really manage, and what they are using.
A CPU has a clock: a part that sends out electrical pulses at a steady rate, which keep all the CPU’s parts working in step. Each pulse is one clock cycle, a chance for the CPU to do one small step of its work. The clock speed is the number of clock cycles per second. It is measured in hertz (Hz): one cycle per second. A gigahertz (GHz) is a billion cycles per second.
A higher clock speed means more clock cycles every second, so the CPU can carry out more instructions in each second. A 3 GHz CPU has 3 billion clock cycles a second.
| Clock speed | Clock cycles per second |
|---|---|
| 1 GHz | 1 000 000 000 |
| 3 GHz | |
| 2.5 GHz | |
| 4 GHz |
- A billion is a 1 followed by nine zeros.
Show the completed table
| Clock speed | Clock cycles per second |
|---|---|
| 1 GHz | 1 000 000 000 |
| 3 GHz | 3000000000 |
| 2.5 GHz | 2500000000 |
| 4 GHz | 4000000000 |
Check your understanding
Show the answer
Answer: C. A faster clock produces more heat and uses more power, so there is a limit to how fast a CPU can run.
A faster clock does more work each second, but it also makes more heat and uses more power.
Stage: Think
A shelf within reach
The kitchen’s main stores are in a storeroom across the yard. The cooks use salt, oil and flour constantly, and the stores are a long walk away.
Think it through
What would sensible cooks do about the things they use all the time, and what would decide how much they could keep at the counter?
- Hint 1: What would you want within arm’s reach? What limits the size of the counter shelf?
Show what happens
They would keep copies of the most-used items on a shelf at the counter, and walk to the storeroom only for things that are not there. What they can keep is limited by how much room the shelf has. A CPU does the same with memory.
Fetching instructions and data from RAM is slow compared with how quickly a CPU works, so the CPU would often have to wait. To reduce the waiting, the CPU has a cache: a small amount of very fast memory, on or very close to the CPU, that keeps copies of the instructions and data used most often. The CPU looks in the cache first. If what it needs is there, it is delivered quickly. If not, it is fetched from RAM, and a copy is usually kept in the cache for next time.
A larger cache can hold more of what the CPU needs, so it finds what it wants in the cache more often and waits for RAM less. Cache has limits. It costs much more than RAM and takes up space on the CPU chip, so it is always far smaller than RAM; and beyond a certain size, most of what a program uses repeatedly already fits, so adding more makes little difference.
Do not confuse: Cache and RAM
- Which is faster?Cache
- Very fast, small, on or beside the CPU. Holds copies of what is used most often.The salt on the counter shelf.
- Which is bigger?RAM
- Much larger, but slower to reach. Holds the programs and data currently in use.The storeroom across the yard.
Check your understanding
Show the answer
Answer: D. It can keep more of what it uses often, so it waits for RAM less often.
A larger cache means fewer waits for RAM, up to a point.
Stage: Apply
Which change would help?
Cores, cache and clock speed can each improve performance, in different ways. The number alone does not tell the whole story.
It is tempting to think that the CPU with the biggest numbers is always fastest. A CPU with a higher clock speed and fewer cores can be slower than another for work that can be shared out, and a CPU with a small cache can be held back by waiting for RAM, whatever its clock speed. Performance depends on all three together, and on the program being run.
Apply it
Show the answer
Answer: B. Replacing the CPU with one that has more cores.
Separate programs are work that can be shared out between cores.
| What it describes | Which one |
|---|---|
| It keeps copies of the most-used instructions and data close to the CPU. | |
| It sets how many steps the CPU can take each second, in GHz. | |
| Each can fetch, decode and execute instructions separately, at the same time as the others. | |
| A bigger one means the CPU waits for RAM less often. |
- The cooks are the cores, the metronome is the clock, the counter shelf is the cache.
Show the completed table
| What it describes | Which one |
|---|---|
| It keeps copies of the most-used instructions and data close to the CPU. | cache |
| It sets how many steps the CPU can take each second, in GHz. | clock speed |
| Each can fetch, decode and execute instructions separately, at the same time as the others. | cores |
| A bigger one means the CPU waits for RAM less often. | cache |
Apply it
Show the answer
Answer: C. It cannot be known from these numbers alone: cache, and how much work can be shared out, also matter.
The three factors act together, and the program matters too.
Stage: Think
What a CPU can be told to do
Think it through
A CPU is an electronic circuit. It cannot read English, or Python, or Scratch. In what form must an instruction reach it? And who has to decide which instructions it will understand?
- Hint 1: What are the only two values a circuit’s signals can have?
A CPU’s instruction set is the list of all the commands that it can process, such as add, compare, load a value from memory or store a value to memory. Each command is written in machine code: a binary pattern, the only form of instruction that a CPU can carry out directly. During the decode stage, the control unit recognises which command a pattern is.
Programs that people write in languages such as Python are changed into machine code before the CPU can run them. Different designs of CPU have different instruction sets: a typical laptop’s CPU and a typical phone’s CPU often use different ones.
Check your understanding
Show the answer
Answer: C. It is the list of commands that a particular CPU can process, each of them in machine code.
The instruction set lists the commands a CPU can process, in machine code.
Apply it
Show the answer
Answer: B. It will not run correctly, because the binary patterns do not mean the same to the other CPU.
A program in machine code belongs to one instruction set.
Stage: Discover
Computers you do not call computers
Think it through
A washing machine and a laptop both contain a processor. What does the washing machine’s processor do all day and night, compared with the laptop’s?
- Hint 1: Does anyone ever load a game onto a washing machine?
Show what happens
The washing machine’s processor does one job, controlling the wash (filling, heating, spinning, stopping). The laptop’s processor runs many different programs that the user chooses, and can be given new ones at any time.
An embedded system is a computer system, usually a small processor with memory, built into a larger device to perform one dedicated function. Its program is usually fixed, stored permanently inside the device, and the user does not change it. A general-purpose computer, such as a personal computer (PC) or a laptop, is the opposite: it can carry out many different functions, depending on which programs are run.
Embedded systems usually have these characteristics: they do one dedicated job; they are small and use little power; they are built to run reliably for years without attention; they have few, simple controls (buttons or a small display); and they often use sensors and actuators to monitor and control the device. Examples are in:
- domestic appliances, such as a washing machine or a microwave oven;
- cars, for example controlling the engine, or the anti-lock braking;
- security systems, such as a burglar alarm that reads its sensors;
- lighting systems, for example street lights that switch on when it gets dark;
- vending machines, which accept money, check it and release the item chosen.
A computer being small, or having a processor, does not make it an embedded system. What matters is what it is for: an embedded system has one dedicated job inside a bigger device. A tablet is small too, but it runs whatever programs its user chooses, so it is a general-purpose computer.
| Device or system | Embedded or general |
|---|---|
| The controller inside a washing machine | |
| A school’s laptop | |
| The control panel of a burglar alarm | |
| A desktop PC | |
| The system in a vending machine | |
| The engine controller in a car |
- Ask: does it do one dedicated job inside a larger device?
Show the completed table
| Device or system | Embedded or general |
|---|---|
| The controller inside a washing machine | embedded |
| A school’s laptop | general |
| The control panel of a burglar alarm | embedded |
| A desktop PC | general |
| The system in a vending machine | embedded |
| The engine controller in a car | embedded |
Stage: Apply
Embedded or general-purpose?
Check your understanding
Show the answer
Answer: A. It is built into the machine to do one dedicated job, and users do not change its program.
Embedded: one dedicated function inside a larger device.
Apply it
Show the answer
Answer: D. The laptop, which runs whatever programs its user chooses.
The other three are embedded systems with one dedicated function.
Stage: Consolidate
Show what you know
Think it through
Explain to a friend, in your own words, how cores, cache and the clock each affect how fast a CPU works, and give one limit for each.
Show a model answer
A good answer covers all three. For example: “More cores let a CPU do several things at once, but only if the work can be shared out. A bigger cache lets the CPU keep more of what it uses often close by, so it waits for RAM less, but cache is expensive, so it stays small. A higher clock speed means more steps every second, but it makes more heat and uses more power.”
Check your understanding
Show the answer
Answer: A. CPU Q has more cycles every second, so it can carry out more instructions each second.
A faster clock means more clock cycles per second.
- A core is a complete processing unit inside a CPU; more cores can do more work at once, but only if there is work that can be shared out.
- The clock speed, in hertz, is the number of clock cycles per second; a higher clock speed does more each second, but makes more heat and uses more power.
- The cache is small, very fast memory that keeps copies of what the CPU uses most, so that it waits for RAM less; a larger cache helps, with limits of cost and space.
- An instruction set is the list of commands a CPU can process; each one is in machine code, binary that the CPU can carry out directly.
- An embedded system does one dedicated function inside a larger device, such as a washing machine, a car, an alarm, street lighting or a vending machine. A general-purpose computer can do many different things.
Sources and scope
- What this lesson is. The third lesson of the Computer Systems module, written for this site. It teaches Cambridge IGCSE Computer Science (0478) points 3.1.3, 3.1.4 and 3.1.5 (2026 to 2028, version 6), after Lessons 1 and 2. Its curriculum links are provisional and imply no endorsement by any examination board. It has not been approved by the site owner.
- Original material. The two school kitchens, the metronome, the storeroom, the listed devices and Jamal’s claim are fictional and were written for this lesson.
- Simplified on purpose. The kitchen is an analogy and has limits. The effect of the clock is described as “more instructions each second”; in real CPUs the number of clock cycles an instruction takes varies, and different designs do different amounts of work per cycle. Cache is described as one memory, though real CPUs have several levels of it. Instruction sets are described in outline; no real instruction set is taught.
An output device that turns a signal from a computer into physical movement, such as a motor that opens a vent.
The part of the CPU that does arithmetic, such as adding and subtracting, and logic, such as comparing two values or applying AND, OR and NOT.
The number system with only two digits, 0 and 1, in which each column is worth twice the column to its right.
A single binary digit: 0 or 1. The smallest unit of data a computer stores.
A small amount of very fast memory, on or very close to the CPU, that keeps copies of the instructions and data used most often, so that the CPU waits less for RAM.
The number of clock cycles the CPU’s clock produces each second, measured in hertz (Hz). The clock’s pulses set the pace at which the CPU works.
The part of the CPU that decodes each instruction and sends signals that make the other parts of the computer carry it out, in the right order.
One processing unit inside a CPU, able to fetch, decode and execute instructions by itself. A CPU with several cores can work on several instructions at the same time.
The part of a computer that carries out instructions: it fetches each instruction from memory, decodes it and executes it, processing data so that a result can be output.
A computer system built into a larger device to carry out one dedicated function, such as the controller inside a washing machine.
A computer that can carry out many different tasks, depending on the programs it runs, such as a personal computer or a laptop.
The unit for how often something happens each second: a sample rate of 1000 Hz means 1000 samples every second.
The list of all the machine-code commands that a particular CPU can process.
Instructions written in binary, the only form of instruction that a CPU can carry out directly.
A high-level programming language written as text, popular for learning and for real work, in which indentation shows which lines belong together.
The computer’s main working memory: it holds the programs and data in use, and can be both read and changed, but loses its contents when the power is switched off.
An input device that measures a physical property of its surroundings, such as temperature or light, and sends the readings to a computer as data.
Your progress on this lesson
Saved in this browser only. It is not sent anywhere, does not follow you to another device, and is lost if you clear this site’s data.
This browser is not allowing the site to save progress, so it will be forgotten when you leave the page.