Learn
3.1.3 | CORES, CACHE AND CLOCK SPEED
01 | THREE FACTORS, THREE DIFFERENT JOBS
A CPU can spend time executing operations or waiting for data. Its performance also depends on how much work a program can divide between processing cores.
| Factor | What it describes | How it can help |
|---|---|---|
| Cores | Independent processing units within a processor | Carry out different instruction streams concurrently |
| Cache | Small, fast memory close to or within the CPU | Reduce waiting for instructions and data from slower main memory |
| Clock speed | Clock cycles per second | Allow more processing cycles in a given time |
Performance is task dependent. A change improves speed only when it helps the work being done. You cannot reliably rank unrelated processors from GHz alone.
02 | A CORE IS A PROCESSING UNIT
A core is a processing unit able to execute instructions. A multi-core CPU contains more than one core, allowing different instruction streams to run concurrently.
One core might work on part of a video render while another works on a different part. Cores can also run different programs at the same time.
Software must divide the work appropriately to benefit. A strictly sequential calculation cannot simply run its dependent steps at the same time because a later step needs the earlier result.
More cores can improve throughput or responsiveness, but doubling cores does not automatically halve every program’s runtime.
03 | VISUALISE WORK THAT CAN BE SHARED
Suppose eight independent jobs each take one time unit on a core. Ignore coordination, data transfer and all other limits.
| Arrangement | Time slot 1 | Time slot 2 | Total slots |
|---|---|---|---|
| One core | Job 1 | Job 2; jobs 3–8 follow | 8 |
| Four cores | Jobs 1–4 together | Jobs 5–8 together | 2 |
The four-core model finishes in two slots rather than eight. This is not a guaranteed fourfold improvement on real hardware.
If job 2 must wait for job 1, job 3 must wait for job 2, and so on, those eight dependent jobs still need eight slots in this model. Extra cores do not remove the dependency.
04 | CACHE: KEEP USEFUL VALUES NEARBY
Cache is small, fast memory used to hold copies of instructions and data likely to be needed by the CPU. Accessing cache is generally quicker than accessing main memory.
A cache hit means the required item is found in the cache. On a cache miss, the system must obtain it from a lower memory level, often main memory, which takes longer.
For example, a loop may repeatedly use the same instructions and nearby data. Keeping them in cache can reduce repeated waits for RAM.
Cache is not permanent file storage and is not a replacement for RAM. It holds selected working copies, not every file on the computer.
05 | WHY A LARGER CACHE CAN HELP
A larger cache can hold more relevant instructions and data. This may increase the chance that a needed item is already nearby, leading to fewer slower memory accesses.
The improvement depends on the access pattern and cache design. A program scanning a huge amount of new data may gain less than one repeatedly reusing a small working set.
More cache does not always mean proportionally more speed. Do not claim that doubling cache halves every program’s runtime. Cache does not change the mathematical result of a calculation.
| Place | Typical role | Relative access in this simplified view |
|---|---|---|
| Registers | Immediate CPU working values | Very fast, very small |
| Cache | Selected copies of useful instructions/data | Fast, limited capacity |
| Main memory (RAM) | Running programs and working data | Larger, typically slower to access than cache |
| Secondary storage | Saved programs and files | Long-term storage, different role |
06 | CLOCK SPEED: CYCLES PER SECOND
The CPU clock provides timing pulses that coordinate operations. Clock speed is the number of clock cycles per second, measured in hertz.
1 GHz = one billion cycles per second. A 3 GHz clock has three billion cycles per second. This is a frequency, not a storage capacity.
For otherwise comparable operation, a higher clock rate can allow more cycles in a given time and reduce execution time. Real performance depends on what is accomplished in each cycle and whether the CPU is waiting for data.
A cycle is not the same as one complete instruction. Instructions can take multiple cycles, and some designs can complete multiple instructions per cycle. Do not translate 3 GHz into “three billion instructions per second” as a universal rule.
07 | WORKED CLOCK COMPARISON
Assume the same task needs exactly six billion cycles on either of two otherwise comparable CPUs, with no other delays.
| Clock | Calculation | Model runtime |
|---|---|---|
| 2 GHz | 6 billion cycles ÷ 2 billion cycles per second | 3 seconds |
| 3 GHz | 6 billion cycles ÷ 3 billion cycles per second | 2 seconds |
The faster clock reduces the model runtime from three seconds to two. This comparison works because the required cycle count and other conditions are held fixed.
Different processor designs may need different cycle counts for a task. Clock rates may also change during operation because of power or temperature limits. Compare actual task performance when those factors are not controlled.
08 | CHOOSE FOR THE WORKLOAD
| Workload | Potentially helpful factor | Reason / qualification |
|---|---|---|
| Many independent rendering jobs | More cores | Jobs can be distributed, if software supports it |
| Repeatedly reused instructions and data | Suitable cache capacity | More useful values may remain close to the CPU |
| Sequential work with comparable cycles per task | Higher clock speed | Those required cycles can be completed sooner |
| Many programs at once | More cores and sufficient memory | Work can be scheduled concurrently; RAM and other limits still matter |
For an exam explanation, link property to consequence: “A larger cache can hold more frequently needed data, therefore the CPU may make fewer slower RAM accesses, reducing waiting time.”
For evaluation, qualify the conclusion: “More cores help if the rendering software can divide the work; they do not guarantee a speedup for a sequential task.”
09 | COMMON MISTAKES
- Cores equal guaranteed speed multiplication: software and dependencies limit parallel work.
- Cache is permanent storage: it holds working copies of instructions/data.
- GHz counts instructions: it counts clock cycles per second.
- Higher GHz always wins: architecture, workload and memory waits matter.
- One component controls all performance: storage, RAM and other system limits can affect the task too.