Unable to open this exercise
Common exam pitfall
Students often write MHz instead of GHz for modern computer processors.
Not all microprocessors execute instructions at the same speed. A processor's overall computing performance is determined by several core architectural factors working in combination: clock speed, cache memory, the number of processing cores, and bus widths.
Learning Objectives
- Explain how clock speed, cache size, and the number of cores influence CPU performance.
- Evaluate the practical limitations of increasing clock frequency, including heat dissipation and thermal throttling.
- Explain why adding CPU cores does not produce a linear increase in application speed.
- Describe how address bus width and data bus width affect throughput and memory capacity.
1. System Clock Speed
The CPU clock is an electronic quartz oscillator that emits pulses of electrical voltage at a constant frequency. Each micro-operation in the CPU occurs on a clock pulse.
- Measurement: Clock speed is measured in Hertz (Hz). Modern computer processors operate in Gigahertz (GHz), where $1\text{ GHz} = 1\text{ billion clock cycles per second}$.
- Impact on Performance:
- A CPU running at $3.5\text{ GHz}$ can perform $3.5\text{ billion}$ clock cycles every second.
- Increasing the clock speed allows more FDE cycles to be executed per second, speeding up program execution.
- Physical Limitations:
- Power Consumption: Higher clock frequencies require higher electrical voltage.
- Heat Generation: Rapid switching of billions of transistors generates substantial thermal energy. Without high-end liquid cooling or heat sinks, the CPU overheats.
- Thermal Throttling: When temperatures reach critical thresholds (typically $\sim 100^\circ\text{C}$), the CPU automatically reduces its clock speed to prevent permanent physical damage.
2. CPU Cache Memory
Primary RAM is physically located several centimetres away from the CPU on the motherboard and is constructed of Dynamic RAM (DRAM), which is relatively slow. If the CPU had to wait for RAM on every instruction, it would spend most of its time idling in "wait states".
Cache memory is ultra-fast Static RAM (SRAM) integrated directly onto the CPU silicon chip:
[ CPU Core: ALU & Registers ]
|
v (Instantaneous: ~1 clock cycle)
[ Level 1 Cache (L1) ]
|
v (Extremely fast: ~4 clock cycles)
[ Level 2 Cache (L2) ]
|
v (Fast, shared across cores: ~10 clock cycles)
[ Level 3 Cache (L3) ]
|
v (Slow, external motherboard bus: ~100 clock cycles)
[ Primary Memory (DRAM) ]
- How It Works:
- The CPU checks cache first before querying RAM.
- If requested data is found in cache $\implies$ Cache Hit (retrieved instantly).
- If data is not in cache $\implies$ Cache Miss (must fetch from slow RAM).
- Impact on Performance:
- Larger cache sizes store more instructions and loops locally on-chip, increasing the cache hit rate and avoiding memory bus latency.
3. Number of Processor Cores
A processor core is an independent, complete processing unit containing its own Control Unit, ALU, registers, and L1 cache.
- Single-Core: Executes one instruction stream at a time.
- Dual-Core (2 cores), Quad-Core (4 cores), Octa-Core (8 cores): Capable of executing multiple distinct instruction streams simultaneously (parallel processing).
Why Doesn't Doubling Cores Double Performance?
Users often expect an 8-core processor to be 4 times faster than a 2-core processor. In practice, this is rarely true:
- Software Threading Constraints:
- Software must be written specifically to divide tasks into multiple concurrent threads (multithreading).
- Many applications (and many algorithms) are inherently sequential (Step B depends on the result of Step A). Sequential code runs on only one core, leaving the other cores idle.
- Inter-Core Communication Overhead:
- The operating system must coordinate threads across cores.
- Cores must synchronize access to shared resources (L3 cache, main memory, and disk I/O). The time spent managing thread locks and synchronization reduces overall performance gains.
- RAM and Bus Bottlenecks:
- Even if 8 cores run at full speed, they all share the same memory controller and system data bus to RAM. If the bus becomes congested, cores must wait.
4. System Bus Width
- Address Bus Width:
- Determines the maximum amount of physical RAM the CPU can directly address:
- A 32-bit address bus can address $2^{32} = 4,294,967,296\text{ bytes} = 4\text{ GiB}$ of RAM.
- A 64-bit address bus can address $2^{64} = 16\text{ EiB}$ (Exbibytes), removing memory limits for modern computing.
- Data Bus Width:
- Determines the word size—how many bits of data can be transferred in a single clock cycle between CPU and memory.
- A 64-bit data bus transfers 8 bytes per cycle, double the throughput of a 32-bit data bus.
Written practice and self-review
A user upgrades a desktop computer from a dual-core 3.2 GHz CPU to an octa-core 3.2 GHz CPU (increasing cores from 2 to 8 at the same clock speed).
The user expects all computer programs to run four times faster.
Explain why programs will not achieve a fourfold speed increase, discussing:
- Software multithreading support.
- Communication overhead between processor cores.
Write an explanation before checking the theory. Check that each claim answers the question, uses the correct concept and explains why it applies. Discuss uncertain points with a teacher. The structured exercise below checks specific facts; it does not automatically mark this explanation.
AI Socratic Tutor
Need guidance? Ask a question or use the hint below.
AI Socratic Tutor is an All-Access Benefit
Unlock step-by-step Socratic hints, algorithm trace table walkthroughs, and error diagnostics for every Cambridge exercise.
You're chatting with an AI tutor, not a person. AI can make mistakes, so double-check its answers.
Exam-Style Question: Identifying Processor Performance Elements
Complete each statement describing CPU performance factors:
- Processor clock frequency in modern personal computers is typically measured in [Space 1] (billions of cycles per second).
- The ultra-fast static RAM integrated directly onto the CPU die to hold frequently used instructions is called [Space 2] memory.
- A processor containing four independent physical processing units on a single chip is known as a [Space 3] processor.
Interactive exercises for Module 2 and beyond require an active plan.