KS4J277 1.1.2 22 min read 10 question quiz 19 exam marks

CPU Performance

The three factors that decide how fast a processor is, why doubling the cores does not double the speed, and how to compare two CPUs in an exam answer.

The three factors

Three characteristics affect CPU performance. You must be able to explain all three and, more importantly, explain the limits of each.

1. Clock speed

The clock produces a regular electrical pulse. One pulse is one clock cycle, and roughly speaking one instruction is processed per cycle. Clock speed is measured in hertz.

  • 1 Hz = one cycle per second
  • 1 MHz = one million cycles per second
  • 1 GHz = one billion cycles per second

A 3.2 GHz processor completes 3.2 billion cycles every second. Higher clock speed means more instructions executed per second, so the computer is faster.

The limit

Raising clock speed raises heat and power consumption sharply. Beyond a certain point the chip cannot be cooled reliably, which is why clock speeds have barely moved in twenty years. This is the point that earns you the higher marks.

2. Number of cores

A core is effectively a complete processing unit: it has its own ALU, control unit and registers. A dual core CPU has two, a quad core has four.

Each core can fetch, decode and execute instructions independently and at the same time, so in theory four cores complete four times as much work per second.

In practice they do not, for two reasons:

  • Not all software is written to use multiple cores. A program that runs as a single sequence of instructions can only use one core, no matter how many are available.
  • Cores must communicate and share resources. Coordinating work between cores, and sharing cache and memory, adds overhead.
The exam sentence

A quad core processor can process four instructions simultaneously, but only if the software has been written to divide the work between cores. Otherwise the extra cores sit idle.

3. Cache size

Cache is fast memory close to the CPU holding recently and frequently used instructions and data. Larger cache means a greater proportion of requests are found there rather than in the far slower RAM, so the CPU spends less time waiting.

Beyond a point, extra cache gives smaller and smaller gains, because the most useful data is already in there, and larger cache is slower to search as well as more expensive.

What decides how fast a processor is: clock speed, cores and cacheThe three things that decide how fast a processor is. Clock speed is how many cycles it runs each second, measured in gigahertz, and 3.6 GHz means three thousand six hundred million cycles a second; each cycle can carry out part of an instruction, so more cycles means more work done, as long as nothing else is holding it up. The number of cores is how many instructions it can genuinely process at the same time, since each core is a complete processor; four cores can work on four jobs at once, but only if the work can be split up. Cache is a small amount of very fast memory on the processor chip, about a nanosecond away, where the processor keeps what it is likely to need next, so it waits for main memory, about a hundred nanoseconds away, less often. A bigger number on one of these is not automatically a faster computer, because the other two, and the software, can hold it back.Clock speedCoresCache3.6 GHz3,600,000,000 cyclesevery secondmore cycles = more done12344 cores4 jobs at the same momentif the work can be splitL1cache: ~1 nsRAM: ~100 nsCachememory on the chip itselfwaits for RAM less often!A bigger number is not automatically a faster computer.Cores that cannot be kept busy, or a slow memory, hold the whole machine back.1234
  1. Clock speed: how many cycles the processor runs each second.
  2. Cores: how many instructions it can genuinely work on at once.
  3. Cache: fast memory on the chip, so it waits for RAM less often.
  4. A bigger number is not automatically a faster computer.
Exam answers that just say ‘higher clock speed is faster’ get one mark. Saying what it does, and what limits it, gets the rest.
A processor cooler: fan, fins and heat pipesA processor cooler: a block of metal fins with a fan mounted on top, sitting on a motherboard above the processor socket.fanpushes air through the finsmetal finsspread the heat into the airheat pipescarry heat up from the basebase platesits on the processor
A faster clock speed makes more heat, and heat is the limit. This is why processors gained cores instead of gigahertz.Drawn illustration

Comparing two processors

Exam questions often give you two specifications and ask which is better, or ask you to justify a choice for a particular use.

Processor AProcessor B
Clock speed3.8 GHz2.9 GHz
Cores28
Cache4 MB16 MB

There is no single right answer here, and the marks are for the reasoning.

  • For software that runs as a single thread, such as many older games or a simple script, Processor A may well feel faster, because each individual instruction stream is processed more quickly.
  • For video rendering, compiling code or running many programs at once, Processor B wins comfortably, because the work can be divided across eight cores and it also has four times the cache.
How to answer 'which is better'

Never just pick one. Say what each is better at, name the factor that causes it, and then commit to an answer for the specific use in the question. A justified answer with a clear conclusion scores highest.

A note on multi core versus multi threading

You are not required to go deep on threading at GCSE, but you should know that a thread is a sequence of instructions. Software that is multi threaded can split its work into several threads, which the operating system can then place on different cores. Software that is single threaded cannot, which is the real reason extra cores sometimes make no difference at all.

Key terms you must be able to define

Clock speed
The number of fetch decode execute cycles a processor can perform each second, measured in hertz.
Hertz (Hz)
One cycle per second. A gigahertz is one billion cycles per second.
Core
A complete processing unit within a CPU with its own ALU, control unit and registers, able to execute instructions independently.
Multi core processor
A CPU containing two or more cores, allowing several instructions to be processed at the same time.
Cache
Small, fast memory close to the CPU that holds recently or frequently used data and instructions.
Thread
A single sequence of instructions that can be scheduled onto a core.

Flashcards

Say the definition out loud before you flip the card. Retrieving it from memory is what builds recall, reading it again is not.

DefineClock speed
AnswerThe number of fetch decode execute cycles a processor can perform each second, measured in hertz.
DefineHertz (Hz)
AnswerOne cycle per second. A gigahertz is one billion cycles per second.
DefineCore
AnswerA complete processing unit within a CPU with its own ALU, control unit and registers, able to execute instructions independently.
DefineMulti core processor
AnswerA CPU containing two or more cores, allowing several instructions to be processed at the same time.
DefineCache
AnswerSmall, fast memory close to the CPU that holds recently or frequently used data and instructions.
DefineThread
AnswerA single sequence of instructions that can be scheduled onto a core.

Reach the top grade on this topic

The difference between a level 5 and a level 9 answer on this topic is almost entirely about stating the limitation.

Anyone can write "more cores means faster". The mark for AO2 comes from writing "more cores means faster only if the software is written to use them, because a single threaded program will run on one core and leave the others idle".

Do the same for each factor:

FactorThe basic pointThe point that gets the extra mark
Clock speedMore cycles per second, so more instructions per secondHeat and power rise sharply, so clock speed cannot be raised indefinitely
CoresSeveral instructions processed simultaneouslyOnly if software is multi threaded, and coordination between cores adds overhead
CacheFewer slow trips out to RAMDiminishing returns, and larger cache is more expensive and slower to search
  • Practise writing a three sentence justification comparing two named processors for a stated purpose
  • Always finish a compare question with a clear decision, not a shrug

Mistakes that cost marks here

Avoid these
  • Writing that a quad core processor is always four times faster than a single core one. It is not, because most tasks cannot be perfectly divided.
  • Confusing clock speed with the number of instructions. One cycle is roughly one instruction, but they are not the same thing.
  • Saying cache 'stores more programs'. Cache stores small amounts of frequently or recently used data and instructions, not whole programs.
  • Giving a comparison answer with no conclusion. If the question says justify, you must commit to a choice.
  • Using the word 'faster' with no explanation of what is actually happening.
Fun fact

Clock speeds stopped climbing around 2005. Chips hit roughly 4 GHz and further increases produced so much heat they became impractical. That physical wall is exactly why manufacturers switched to adding cores instead.

Knowledge check

0 of 10 answered
1A processor has a clock speed of 2.5 GHz. Approximately how many cycles does it complete each second?
2Why might a quad core processor not run a program four times faster than a single core processor?
3What is the main practical limit on raising clock speed?
4Which component would most improve performance for a computer that constantly re-uses the same small set of instructions?
5A core contains its own:
6Processor A is 4 GHz dual core. Processor B is 3 GHz octa core. Which is likely better for rendering a video?
7What does a cache hit rate of 95 per cent mean?
8Which statement about clock speed is correct?
9Why does adding a fourth level of cache give little benefit on most systems?
10A user runs many applications at once and complains of slowdown. Which upgrade most directly addresses this?
Score 0 / 10

Exam-style questions

Five written questions in the style of the real paper. Write a full answer, then let the marker check it against the mark scheme.

19 marks
1State what is meant by the clock speed of a processor.2 marks
State

Mark scheme0 / 2
  • LThe number of cycles or instructions performed each second
  • LMeasured in hertz, commonly gigahertz
Model answer

Clock speed is the number of fetch decode execute cycles a processor completes each second. It is measured in hertz, and modern processors are usually quoted in gigahertz, where one gigahertz is one billion cycles per second.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
2Explain why a computer with a quad core processor may not run a particular program four times faster than a computer with a single core processor of the same clock speed.4 marks
Explain

Mark scheme0 / 4
  • LThe program must be written to divide work across multiple cores
  • LA single threaded program can only run on one core, leaving the others idle
  • LSome tasks are sequential and cannot be split because later steps depend on earlier results
  • LCoordinating cores and sharing cache or memory adds overhead
Model answer

A quad core processor can only deliver four times the throughput if the work can actually be divided between the four cores. This requires the program to be written as multiple threads. If the program is single threaded then it runs on one core and the other three sit idle, so there is no gain at all. Even in multi threaded programs, some parts of a task are inherently sequential because later steps depend on results produced earlier, and those parts cannot be run in parallel. In addition, the cores must communicate with each other and share cache and memory bandwidth, and this coordination adds overhead that reduces the theoretical speed increase.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
3A video editing company must choose between Processor X at 4.1 GHz with two cores and 4 MB cache, and Processor Y at 3.0 GHz with eight cores and 16 MB cache. Recommend a processor and justify your choice.6 marks
Justify

Mark scheme0 / 6
  • LRecommends Processor Y
  • LVideo editing and rendering can be divided into independent tasks across cores
  • LEight cores process far more instructions simultaneously than two
  • LThe larger 16 MB cache raises the hit rate so the CPU waits on RAM less often
  • LAcknowledges that Processor X has the higher clock speed and would be better for single threaded work
  • LConcludes that the parallel nature of video work outweighs the clock speed advantage
Model answer

Processor Y is the better choice for this company. Video editing and rendering split naturally into independent tasks, such as processing separate frames or segments, so the work can be shared across all eight cores and run simultaneously. Eight cores at 3.0 GHz will therefore complete far more instructions per second on this workload than two cores at 4.1 GHz. Processor Y also has 16 MB of cache rather than 4 MB, which raises the cache hit rate and means the CPU spends less time waiting for data from RAM, and video work moves large amounts of data. Processor X does have the higher clock speed, and it would be the better choice for single threaded software where only one core can be used. However, because video rendering parallelises well, the four times increase in core count and the four times increase in cache outweigh the roughly 37 per cent clock speed advantage, so Processor Y should be chosen.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
4Explain how increasing cache size can improve processor performance, and give one reason why simply making the cache as large as possible is not the best solution.4 marks
Explain

Mark scheme0 / 4
  • LMore frequently or recently used data and instructions can be stored close to the CPU
  • LMore requests are satisfied by cache rather than the slower RAM
  • LThe CPU spends less time waiting so completes more instructions per second
  • LCache is expensive per byte, takes physical space on the chip, and larger caches take longer to search, so returns diminish
Model answer

Increasing cache size means more of the instructions and data the processor uses frequently can be held in memory that sits inside or very close to the CPU. This raises the cache hit rate, so a greater proportion of requests are satisfied without going out to the much slower RAM, and the CPU therefore spends less time idle and completes more instructions per second. However, making the cache as large as possible is not the best solution because very fast memory is expensive per byte and takes up physical space on the processor die, and a larger cache also takes longer to search, so the performance gains get smaller and smaller as size increases.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
5Describe one similarity and one difference between a dual core processor and two separate single core processors installed in the same computer.3 marks
Describe

Mark scheme0 / 3
  • LBoth allow two instructions to be processed at the same time
  • LA dual core processor has both cores on a single chip
  • LCores on one chip communicate faster and can share cache, reducing latency
Model answer

A similarity is that both arrangements allow two instructions to be fetched, decoded and executed at the same time, so both can genuinely process work in parallel. A key difference is that a dual core processor has both cores built onto a single chip, which means they are physically much closer together and can share cache and communicate over very short internal connections. Two separate processors must communicate across the motherboard, which is slower, so the dual core arrangement generally has lower latency when cores need to work together.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
Machine mark 0 / 19