Edexcel International Advanced Level Computer Science, point 1.1.2
Definition
A computer architecture is the overall design of a computer: what its components are and how they work together.
von Neumann architecture is a computer design in which a single main memory holds both instructions and data, and a single set of buses carries both between memory and the processor. It is the practical form of the stored-program concept (1.1.1).
Function
It gives a simple, general-purpose design: a processor that fetches instructions one at a time from memory, carries them out, and reads or writes data in the same memory.
Characteristics
- One memory for instructions and data, in one address space.
- One set of buses (address, data and control) joining the CPU, memory and input/output.
- A CPU containing a control unit, an arithmetic logic unit (ALU) and registers.
- The control unit and ALU work in step, kept in time by the clock signal (1.1.4).
- Instructions are carried out sequentially, using the fetch-decode-execute cycle.
- Memory is addressed by location number, and all locations are treated the same way.
Operation
- The CPU puts an address on the address bus.
- A read signal on the control bus tells memory to respond.
- Memory places the contents on the data bus, and the CPU receives them.
- If the contents are an instruction, the CPU decodes and executes it. If they are data, they are used by the instruction being carried out.
Because one bus is shared, a fetch of an instruction and a read or write of data can't happen at the same time. They take turns.
Benefits
- Simple and cheap to design and build: one memory and one set of buses.
- Flexible use of memory: it can be split between instructions and data as a program needs, with no memory left idle.
- Easy to program and control, since every item is reached by address.
- A well-understood design used in most general-purpose computers.
Drawbacks
- The von Neumann bottleneck: the single bus limits how fast the CPU can get instructions and data. The CPU is often waiting for memory.
- Only one access at a time.
- Instructions and data can overwrite each other, so a program fault can damage the program itself.
- Security risk: because instructions sit in the same memory as data, malware can more easily alter a program's instructions.
- Sequential working doesn't suit tasks that benefit from doing many things at once.
Processor designers reduce the bottleneck with cache memory (1.1.6) and pipelining (11.1.3). A different design, Harvard architecture (11.1.1), uses separate memories and buses.
Worked example
Task: a program adds two numbers held in memory. Explain how a von Neumann computer fetches what it needs.
- The CPU needs the instruction
ADD, so it places the instruction's address on the address bus. Memory sends back the instruction on the data bus. - The CPU decodes it, and finds that it needs a number from address 200.
- The CPU places 200 on the same address bus, and memory returns the number on the same data bus.
- The same happens for the second number.
That's at least three separate trips over one shared path, one after another. A machine with separate paths for instructions and data could fetch the next instruction while the data was being read. This is why the shared path is a bottleneck.
Exam tip: the key facts are one memory and shared buses for instructions and data. When asked about the drawback, say the bottleneck, and explain it: instructions and data can't be fetched at the same time. Be ready to complete a diagram of the components, so learn which parts connect to the buses.
Check yourself
What is the main feature of von Neumann architecture?
A single memory holds both instructions and data, and a single set of buses carries them between memory and the processor.
Name the main components of a von Neumann computer
The CPU (control unit, ALU and registers), main memory, input/output, and the buses (address, data and control).
What is the von Neumann bottleneck?
The limit on speed caused by instructions and data sharing one bus, so the CPU often has to wait because it can't fetch both at once.
Give one benefit of von Neumann architecture
It is simple and cheap to build, and memory can be shared flexibly between instructions and data.