AQA 7517, section 4.7.3.7
Several design features decide how quickly a processor can run programs. You need to be able to explain the effect of each.
Clock speed
The clock speed is the number of clock cycles per second, in hertz. A 3 GHz processor has 3 billion cycles per second. Each step of the fetch-execute cycle takes at least one cycle, so a faster clock lets the processor execute more instructions per second.
- Higher clock speed gives better performance, if everything else is equal.
- There are limits: a faster clock produces more heat and uses more power, and the processor may become unstable if overclocked too far.
- It doesn't help if the processor must wait for slower memory.
Multiple cores
A core is a complete processing unit (ALU, control unit and registers). A multi-core processor has two or more cores on one chip, so it can run several instructions at once, which is parallel processing.
- It can run several programs at the same time, with one on each core.
- One program can be faster if it is written to use several cores, by splitting its work into parts.
- It doesn't always give a proportional gain: a program written to run one step after another can't use extra cores, and cores must share memory and coordinate, which takes time. Four cores don't mean four times the speed.
Cache memory
Cache memory is a small amount of very fast memory between the processor and main memory. It holds copies of the most recently or frequently used instructions and data.
- Main memory is much slower than the processor, so waiting for it wastes time.
- When the processor needs something, it looks in the cache first. If it's there (a cache hit), it is available at once. If not (a cache miss), it is fetched from main memory, and a copy goes into the cache.
- This works because programs tend to reuse the same instructions and data (for example, in loops).
- Larger and faster caches give better performance, but cost more. Caches come in levels: L1 is the smallest and fastest (inside each core), then L2, then L3 (larger and shared).
Word length
The word length is the number of bits that the processor handles as one unit, such as 32 or 64 bits. This is the size of the registers and what the ALU works on.
- A longer word length means each operation handles more data at once, so fewer operations are needed for large numbers.
- It allows larger numbers and more precision to be handled directly.
- Instructions can be longer, so they can have more opcodes and bigger operands.
- It often goes with a wider address, allowing more memory.
Address bus width
The address bus width decides how many memory locations the processor can address: for lines.
| Address bus | Addressable memory |
|---|---|
| 16 bits | = 64 Ki locations |
| 32 bits | = 4 Gi locations (4 GiB if each is a byte) |
| 64 bits | = about locations |
A wider address bus allows more memory to be used, so bigger programs and more data can be held in RAM, with less swapping to slow disk storage. It doesn't make each access faster, but it removes a limit.
Data bus width
The data bus width is the number of bits that can be transferred between the processor and memory at once.
- A wider data bus moves more data per memory access. A 64-bit data bus can fetch twice as much as a 32-bit one in the same time.
- This speeds up transfers and reduces the number of accesses needed.
Summary
| Factor | Effect on performance | Limit or catch |
|---|---|---|
| Clock speed | More instructions per second | Heat and power use |
| Multiple cores | Several instructions at once | Software must be able to use them |
| Cache memory | Faster access to frequent data | Small and expensive |
| Word length | More data per operation | Larger registers cost more |
| Address bus width | More addressable memory | Doesn't speed up a single access |
| Data bus width | More data moved per access | More wires and cost |
Worked example
Task: a computer is slow when editing large videos. It has 4 GiB of RAM, a 32-bit address bus and a single core. Suggest upgrades and explain.
- More RAM (needs a wider address bus than 32 bits to go beyond 4 GiB), so less data has to be swapped to the slower disk.
- A multi-core processor, since video editing can be split into parts that run in parallel on different cores.
- A larger cache, so frequently used data is available quickly.
- A higher clock speed would also help, but the gain is limited by heat.
Exam tip: don't just say "faster". Say why: a higher clock speed gives more cycles per second, a wider data bus moves more bits per transfer, a wider address bus lets more memory be addressed, and a cache avoids slow trips to main memory.
Check yourself
Why doesn't doubling the number of cores always double the speed?
Some programs run one step after another and can't use extra cores, and the cores need time to coordinate and share resources.
How does cache memory improve performance?
It keeps copies of frequently used instructions and data in very fast memory close to the processor, so the processor often avoids waiting for slower main memory.
What is the effect of increasing the width of the address bus?
More memory locations can be addressed ( for bits), so the computer can use more RAM.
What is the effect of a wider data bus?
More bits are transferred between the processor and memory in each access, so data moves faster.