The Von Neumann machine is the type of model that the vast majority of real general-purpose processors support. It is based on the idea of a stored program and stored data residing in some persistent store. An instruction, pointed to by a program counter, is fetched from the program store and then executed. Depending on the type of instruction, it may read and write data values to the data store. This pattern of fetch and then execute is constantly repeated. It is known as the fetch-execute cycle, and is illustrated in Figure 24.1. A machine understandable form of a user program is stored in memory and is used to direct the machine's behavior. If we wish to change the machine's behavior, we merely change the program not the machine.
All modern computers use the Von Neumann machine in which instructions and data share the same physical memory unit.
Instructions cycle:
A program residing in the memory unit of the computer consists of a sequence of instructions.
In the basic computer each instruction cycle consists of the following phase
i) Computes the new value for program counter
ii) Fetch an instruction from the memory
iii) Decode the instruction
iv) Execute the instructions
Register:- The register set stores intermediate data used during the execution of the instructions.
Control unit:- Control unit supervises the transfer of information among the registers and instructs the ALU as to which operation to perform.
Arithmetic Logic Unit (ALU):- ALU performs the required micro-operation for executing the instructions.
One key aspect of the von Neumann model is that it is strictly sequential. That is, only one instruction is executed at a time — rather like following a recipe. This enforced sequentially made the job of early programmers easier as they had to only consider one operation at a time. However, sequential descriptions of problems are actually neither necessary nor natural. As well as having a strictly sequential execution procedure, the von Neumann model also distinguishes between mutable data and immutable program. That is, we can change or overwrite data, as often we like, but we may not change the program as we run — i.e. self-modifying code is not allowed. The classical von Neumann model of a computer system is shown in Figure 24.2. It consists of a processor, memory and interfaces. As stated previously, the memory stores instructions and data, while the processor performs the computation, following a fetch/execute cycle.
A Von Neumann Architecture computer performs or emulates the following sequence of steps:
- Fetch the next instruction from memory at the address in the program counter.
- Add 1 to the program counter.
- Decode the instruction using the control unit. The control unit commands the rest of the computer to perform some operation. The instruction may change the address in the program counter, permitting repetitive operations. The instruction may also change the program counter only if some arithmetic condition is true, giving the effect of a decision, which can be calculated to any degree of complexity by the preceding arithmetic and logic.
- Go back to step 1.
Very few computers have a pure von Neumann architecture. Most computers add another step to check for interrupts, electronic events that could occur at any time. An interrupt resembles the ring of a telephone, calling a person away from some lengthy task. Interrupts let a computer do other things while it waits for events.
Von Neumann computers spend a lot of time moving data to and from the memory, and this slows the computer. So, engineers often separate the bus into two or more busses, usually one for instructions, and the other for data.
thank you
ReplyDelete