Basic architectural principles of computing systems. Execution of instructions.

Computers are very cool thing, but how do they work? 


First we say how are fictitious. 

Of course, that the military - they have invented everything (from sugar to porn) to a waste of time. 

But seriously. In the 40s a group of engineers and mathematicians Pentagon invented the principle of operation of powerful computing device. Until then, many attempts have registered patents in this area, but they are not as well developed projects. The project, which concerns us is ENIAC. It sets out the principles of John von Neumann, who joined its creators. 


Actually ... 


This is considered the first major development in the creation of a computer. Von Neumann proposes the principle of operation of the computing device, which, with modifications, is still used today. 

Before the idea of von Neumann wanted to create finite automata with very stable conditions and pathways between them. For this purpose, it took a lot of quick passes without intermediate states. So bring electronic items with two stable states - "electronic keys". 

PB_switch_Circuitlarge.JPG But this is not an electronic switch and mechanical key. Electronic key changes his status at the time of the electric signal. How it will understand a little later. 

"Key" element with two stable states - on and off (do not expect, right?). It is very important key to switch quickly and clearly (without intermediate variants) between its states. In modern computers keys move from one state to the other parts of the nanosecond and will be faster because you have to move electrons at speeds comparable to that of light, and if you do not know, (yet) we can not do such a thing. 

Additional information 

Architecture of von Neumann

karh_block_sheme_main_comparh_lecture1_small.PNG 
The first scheme is the computer von Neumann architecture, in which a computer is divided into two main parts - the CPU and RAM. In this architecture, the program is a series instructions that the processor performs. The instructions should be unambiguous. They determine where (what addresses in memory) processor to take the operands and the operation to perform on them. During the period 1960-1980 have been many attempts to create another effective architecture has integrated circuits that reach the market, but not good enough to be imposed. 
Now a little clarification on the first picture: 

ALU - arithmetic logic unit 

Method and purpose 
BU - Block Management 

Method and purpose 
BR - Block registers 

Method and purpose 
CPU - Central Processor 

Method and purpose 
OP - RAM 

Method and purpose 
Explanation on the second scheme. 
This is the scheme of operation of a von Neuman processor: 
Through the program counter are extracted as many bytes as the length of the instruction and the program counter is updated. 
Once the instruction has been extracted, it is to be deciphered, and to compute the addresses of the operands. Decryption provides the code of the operation to be performed on the operands, if any. 
Is addressing operands. Instructions rarely work with clearly set address, they often have ways in which CPU to calculate this address. Addresses are sent to the OP and the contents of cells whose addresses are sent as input to proceed ALU. 
ALU performs the operation, which has over operands and then the result is stored at a particular location of the instruction.
CPU instructions executed asynchronously (with timeout) - wait for each instruction to complete, and only then begin the next. A, since the instructions may be of different lengths. 
Moreover, it turns out that in a linear embodiment of the instructions from the memory and for a time sufficient for operation of the CPU, over time it will move through the entire PO. This is not desirable, as (I hope I understood the idea correctly!), As opposed to theoretical models, such as Turing machine with infinite bandwidth, physical memory is limited and further away we can not afford to fill it with all instructions (think of operands!). Solution: Enter special instruction for transition. It represents the computation of the address which is then stored in the program counter. The introduction of user transition violates the linearity of the operations of the CPU, in a way programs are shredded. 

Attention! 
The next two sections differ significantly depending on whether listening to lectures, read a book or browse the internet. So give the safest suggestion: remember marked as "first" and "second" principle, and remember paragrafcheto after them, and then look at the additional materials and decide for themselves where the truth (because it's out there). 
If anyone knows how it is, in fact, feel invited to fix our barkochi.

First principle of von Neumann: 
As noted above, the principle states that data and operands are stored in the same memory, and no logical difference between recording data and instructions (of a series of 1 and 0). This is the big difference between computer architectures John Atanasov and von Neumann - Uncle Atanasov instructions and operands are separated. 

Second principle of von Neumann: 
Shown (implicitly) on the second image (the one that is "stuck"). The idea is that the instructions are executed sequentially in principle, that the processor goes "linear" forward instructions. The postulate of fonNoyman is fundamental to computer architecture - all modern computers are von Neumann architecture - with certain modifications. There is no well established another successful architecture. 

With the development of new technologies by physical (hardware) side is not observed as precisely this postulate - modern processors may accept more than one command, but on the software side nothing changes. For programmer instructions are executed sequentially. This is extremely important because very often rely on the result of an operation to perform the following (s): for example, we let X operation with operand address b and result address a, and Y operation with operand address and a address c result in the following sequence: 

X: a b 
Y: c a 

This means that Y used as an operand the result of X, and in order to perform correctly Y, must first complete X; 
all programming is based on the fact that instructions are executed sequentially. 
Your computer is determined by the order of the programs and instructions therein. Attempts to build architecture, where data also play a role - for example, if any operand is ready, the program that uses this operand alone to complete. It turns out, however, it is incomprehensible to the human mind to use such architectures. 

? Third principle of von Neumann ?: 
Separated to two main blocks - CPU and RAM. CP is governed by instructions in memory and CPU instructions executed sequentially from RAM. The two units are connected via a bus.

No comments:

Post a Comment