9 julio, 2024

von Neumann architecture: origin, model, how it works

The von Neumann architecture It is a theoretical design for a computer to have a program stored internally, serving as the basis for almost all computers currently being made.

A von Neumann machine consists of a central processing unit, which includes an arithmetic logic unit and a control unit, as well as main memory, secondary storage, and input/output devices.

This architecture assumes that all computation pulls data from memory, processes it, and then sends it back to memory.

In a von Neumann architecture, the same memory and the same bus are used to store both the data and the instructions that execute a program.

[toc]

Improvement in architecture

Because both data memory and program memory cannot be accessed at the same time, the von Neumann architecture is prone to bottlenecks and degraded computer performance. This is what is known as the von Neumann bottleneck, where power, performance and cost are affected.

One of the changes made involved reconsidering how much data actually needed to be sent to memory and how much could be stored locally.

In this way, instead of having to send everything to memory, multiple caches and proxy caches can reduce the flow of data from processor chips to different devices.

Origin

In 1945, after World War II, two scientists independently posed how to build a more malleable computer. One of them was the mathematician Alan Turing and the other was the equally talented scientist John Von Neumann.

Briton Alan Turing had been involved in breaking the Enigma code at Bletchley Park, using the ‘Colossus’ computer. On the other hand, the American John Von Neumann had been working on the Manhattan Project to build the first atomic bomb, which required a great deal of hand calculation.

Until then, wartime computers were more or less “programmed” by rewiring the entire machine in order to perform a different task. For example, the first computer called ENIAC took three weeks to reconnect to do a different calculation.

The new concept was that not only data should be stored in a memory, but also the program that processed that data should be stored in the same memory.

This architecture with the program stored internally is commonly known as the ‘Von Neumann’ architecture.

This novel idea meant that a computer with this architecture would be much easier to reprogram. Effectively, the program itself would be treated the same as the data.

Model

The main foundation of the Von Neumann model is the thought that the program is stored internally in a machine. The memory unit contains the data and also the program code. The architecture design consists of:

– Central Processing Unit (CPU)

It is the digital circuit that is responsible for executing the instructions of a program. It is also called a processor. The CPU contains the ALU, the control unit, and a set of registers.

logical arithmetic unit

This part of the architecture is involved only in performing arithmetic and logical operations on the data.

The usual calculations of add, multiply, divide and subtract will be available, but data comparisons such as ‘greater than’, ‘less than’, ‘equal to’ will also be available.

Control unit

It controls the operation of the computer’s ALU, memory, and input/output devices, telling them how to act on the program instructions just read from memory.

The control unit will manage the process of moving data and programs to and from memory. It will also take care of executing the instructions of the program, one at a time or sequentially. This includes the idea of ​​a register to hold the intermediate values.

records

They are high-speed storage areas on the CPU. All data must be stored in a registry before it can be processed.

The memory address register contains the memory location of the data to be accessed. The memory data register contains the data that is transferred to memory.

– Memory

The computer will have a memory that can hold data, as well as the program that processes that data. In modern computers this memory is the RAM or main memory. This memory is fast and directly accessible by the CPU.

RAM is divided into cells. Each cell consists of an address and its content. The address will uniquely identify each location in memory.

– Entrance exit

This architecture allows to capture the idea that a person needs to interact with the machine, through the input-output devices.

–Bus

Information must flow between the different parts of the computer. In a computer with the von Neumann architecture, information is transmitted from one device to another along a bus, connecting all units from the CPU to main memory.

The address bus carries the addresses of the data, but not the data, between the processor and memory.

The data bus carries data between the processor, memory, and input-output devices.

How does the von Neumann architecture work?

The relevant principle of the von Neumann architecture is that both data and instructions are stored in memory and are treated the same, which means that instructions and data are directional.

It works using four simple steps: fetch, decode, execute, store, called the «Machine Cycle.»

Instructions are obtained by the CPU from memory. The CPU then decodes and executes these instructions. The result is stored back in memory after the instruction execution cycle is complete.

Look for

In this step, the instructions are obtained from RAM and placed in the cache so that the control unit can access them.

decode

The control unit decodes the instructions in such a way that the arithmetic logic unit can understand them, and then sends them to the arithmetic logic unit.

Execute

The arithmetic logic unit executes the instructions and sends the result back to the cache.

Store

Once the program counter indicates stop, the final result is downloaded to main memory.

Bottleneck

If a Von Neumann machine wishes to carry out an operation with data in memory, these have to be transferred through the bus to the CPU. After performing the calculation, the result needs to be moved to memory via the same bus.

A von Neumann bottleneck occurs when data being moved into or out of memory must wait while the current memory operation is completed.

That is, if the processor has just completed one computation and is ready to perform the next one, it has to write the completed computation to memory, which occupies the bus, before it can retrieve new data from memory, which also uses the same bus.

This bottleneck has been getting worse over time, because microprocessors have increased their speed and on the other hand, memory has not advanced as quickly.

Advantages

– The control unit retrieves data and instructions in the same way from memory. Therefore, the design and development of the control unit is simplified, cheaper and faster.

– Data from input/output devices and main memory are retrieved in the same way.

– The organization of the memory is done by the programmers, which allows the full capacity of the memory to be used.

– Managing a single block of memory is simpler and easier to achieve.

– The microcontroller chip design is much simpler as only one memory will be accessed. The most important thing about the microcontroller is access to RAM and in the von Neumann architecture this can be used both to store data and to store program instructions.

Development of operating systems

The main advantage of having the same memory for programs and data is that the programs can be processed as if they were data. In other words, you can write programs whose data is other programs.

A program whose data is another program is nothing more than an operating system. In fact, if programs and data were not allowed in the same memory space, as is the case with the von Neumann architecture, operating systems could never have been developed.

Disadvantages

Although the advantages far outweigh the disadvantages, the problem is that there is only one bus connecting the memory to the processor, so only one instruction or data item can be fetched at a time.

This means that the processor may have to wait longer for data or instructions to arrive. This is known as a von Neumann bottleneck. Since the CPU is much faster than the data bus, this means that it often sits idle.

– Due to the sequential processing of the instructions, the parallel implementation of the program is not allowed.

– By sharing memory there is a risk that one instruction will be written over another due to an error in the program, causing the system to crash.

– Some buggy programs are unable to free memory when done with it, which could cause the computer to crash due to insufficient memory.

– Data and instructions share the same data bus, although the speed at which each must be retrieved is often very different.

References

Semiconductor Engineering (2019). Von Neumann Architecture. Taken from: semiengineering.com
Scott Thornton (2018). What’s the difference between Von-Neumann and Harvard architectures? Microcontroller Tips. Taken from: microcontrollertips.com.
Teach ICT (2019). The Von Neumann machine. Taken from: teach-ict.com.
Computer Science (2019). Von Neumann Architecture. Taken from: computerscience.gcse.guru.
Learn IT with Mr C (2019). The Von Neumann machine. Taken from: learnitwithmrc.co.uk.
Solid State Media (2017). How do computers work? The Von Neumann Architecture. Taken from: solidstateblog.com.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *