Chapter 4 – Process Execution (Fetch–Execute Cycle)
Core idea
The CPU executes instructions in a repeatable cycle.
Instruction lifecycle
- Fetch – Load instruction from memory
- Decode – Understand the instruction
- Execute – Perform operation
- Write back – Store result
- Increment PC – Move to next instruction
Key facts
- Program Counter (PC) points to current instruction
- Instructions are often fetched in bursts (cache lines)
- Cache is much faster than RAM
Why it matters
- Explains performance differences
- Explains why locality of code is important