1. Introduction to computer systems--study notes on the composition principles of kingly computers

Table of contents

1. Introduction to computer systems

1. The history of computer development

1.1 What is a computer system

1.2 Development of hardware

1.3 Software Development

1.4 Current Development Trends

 2. Basic composition of computer hardware

2.1 Five major parts

2.2 von Leumann structure

2.3 Modern computer architecture

 3. Know each hardware component

3.1 Main memory

3.2 Calculator

3.3 Controller

3.4 Working process

3. Hierarchical structure of computer systems

3.1 Five layers

3.2 Three levels of language

4. Computer performance indicators

4.1 Memory capacity

4.2 CPU

4.3 Others

4.4 Common Quantity Units


1. Introduction to computer systems

1. The history of computer development

1.1 What is a computer system

Computer system = hardware + software;

Hardware: The entities of the computer, such as the mainframe, peripherals, etc.

Software: consists of various programs with special functions;

Note: There is a difference between a database management system (DBMS) and a database system (DBS). DBMS is a layer of data management software located between the user and the operating system, and it is system software; while DBS refers to the system after the database is introduced into the computer system, generally composed of databases, database management systems, database administrators (DBA) and application systems constitute. So the database system is not system software.

1.2 Development of hardware

Features:

The first generation: machine language, large in size and high in cost;

The second generation: began to use high-level languages, and the prototype of the operating system;

The third generation: rapid development of high-level language, time-sharing operating system;

The fourth generation: Microprocessors, parallelism, caches, and other high-tech technologies you can think of

The development of microcomputer is marked by microprocessor technology;

Machine word length: the number of binary digits that a computer can handle in one integer operation; 

 Moore's Law (reveals the rate at which information technology advances):

The number of transistors that can be accommodated on an integrated circuit will double approximately every 18 months , and the overall performance will also double;

1.3 Software Development

Machine-oriented machine language and assembly language---->problem-oriented high-level language

High-level language:

FORTRAN for scientific and engineering computing --> PASCAL for structured design --> object-oriented C++ --> Java adapted to the network

1.4 Current Development Trends

 2. Basic composition of computer hardware

2.1 Five major parts

Input device: converts information into a form that the machine can understand

Output device: converts the result into a familiar form

Calculator: Arithmetic Operations, Logical Operations

Controller: directs the program to run       

Memory: stores data and programs

2.2 von Leumann structure

 Features of von Neumann computers:

  1. A computer consists of five major components;
  2. Instructions and data are stored in the memory at the same position and can be accessed by address
  3. Instructions and data are represented in binary
  4. Instructions consist of opcodes and address codes
  5. stored program
  6. Calculator-centric

The concept of "stored program" refers to inputting instructions into the main memory of the computer in the form of binary code in advance, and then executing the first instruction of the program according to its first address in the memory, and then executing other instructions in the order specified by the program , until the end of program execution.

 In computer systems, software and hardware are logically equivalent. Note that they are not equivalent .

2.3 Modern computer architecture

Since the von Neumann computer is similar to a processing plant, it is common sense that the purchasing department should purchase the raw materials and put them in the storage department first, but in the von Neumann structure, it has to go through the production department to reach the storage department, resulting in an unreasonable place .

Therefore, the modern computer structure is changed to the following figure:

 

 3. Know each hardware component

3.1 Main memory

The structure of the main memory is similar to the structure of the Cainiao station for express delivery: when instructions or data need to be fetched, the address is first given to MAR (equivalent to giving the pickup code to the clerk when picking up the express delivery), and then MAR retrieves it from the storage body according to the address code. Instructions or data are placed in the MDR and wait for the CPU to take them away (equivalent to the clerk picking up the goods from the shelf according to the pick-up code and putting them on the counter to wait for the user to take them away)

The difference is that the main memory can perform both read and write operations: when performing a write operation, give the MAR address code, give the MDR data, and then give the main memory a write signal, and the main memory can save the data according to the address to be stored. to this address

memory bank:

The storage body is equivalent to a smart cabinet for pick-up, and the storage unit is equivalent to a cabinet box, which is used to store the data that needs to be saved. Since each cabinet box is made in advance, it has a fixed size, that is, the storage word length. The storage word length can be determined according to the performance of the computer itself, and the storage word length of computers with different performances is different.

Since MAR stores address codes, how many storage units there are, how many numbers MAR can represent, and the number in MAR is binary, so the number of MAR digits reflects the number of storage units

The MDR is equivalent to a counter, and it is necessary to place the goods (instructions or data) taken out of the storage body, so it is logical that as long as the size of the MDR is the same as the storage unit, all the goods taken out can be placed exactly, so the number of MDR bits = the storage word length

3.2 Calculator

 First of all, it is clear that ACC, MQ and X are used to store data or results, and ALU is used to perform arithmetic

And the core of the arithmetic unit is the ALU (arithmetic logic unit)

Take 3*2+1 as an example:

  1. First execute the fetch instruction, and there is no operation when fetching 3, so automatically put 3 as the result into ACC
  2. Then get the * number from the memory, at this time, the controller will recognize that this is a multiplication operation, so there must be a multiplier that needs to be taken out and put into MQ, so execute the fetch instruction to take out 2 from the memory and put it in MQ
  3. Then perform the multiplication operation. During the execution process, first put the result in ACC into X as an operand, multiply it with the multiplier in MQ through ALU, and then put the result in ACC. At this time, 6 is stored in ACC ( If the result is too large, it may not be stored in ACC, and MQ auxiliary storage will be used )
  4. Then get the + sign from the memory, at this time, the controller will recognize that this is an addition operation, so there must be an addend that needs to be taken out and put into X, so execute the fetch instruction to take out 2 from the memory and put it in X
  5. At this time, the addition operation is performed, and the ALU is directly used to add the result of the previous step in ACC to the addend in X, and the obtained result is still placed in ACC

It can be seen from the above process that:

  • The results of each step of operation are placed in ACC
  • If the operator is fetched, the next step is to fetch the number and put it in the corresponding register (put it in MQ for multiplication, and put it in X for addition), and then perform the operation
  • The operation of multiplication and addition is different (that is, the multiplication needs to put the result of the previous step in ACC into X before executing) because the multiplication operation in hardware is realized by multiple additions, so an intermediate register such as X is needed

3.3 Controller

  1. First, the PC points to the instruction that needs to be executed currently
  2. Then take the instruction from the memory and put it in the IR (instruction register), take out the opcode of the first half of the instruction and put it in the CU
  3. The CU (control unit) will analyze what operation this instruction needs to do: if it is a fetch operation, it will send the address code of the second half of the instruction in the IR to the memory to fetch the data and put it in the calculator; if it is an operation operation, It will take out the operand and put it in the operator, and then control the operator to perform the operation.

3.4 Working process

The following is the specific computer working process, and some of the instructions mean:

(PC) → MAR: Send the main memory address pointed to by PC to MAR

M (MAR) → MDR: Take out the data or instructions corresponding to the main memory address in MAR in M ​​(main memory) and hand it over to MDR

(MDR) → IR: Send fetched instruction to IR (Instruction Register)

OP (IR) → CU: Give the operation code of the current instruction to be executed in IR to CU (control unit) for analysis

AD (IR) → MAR: Give the address code of the instruction to be executed in IR to MAR, and take out the data or instruction corresponding to the address code

MDR → ACC: Send the fetched data to the result register ACC in the arithmetic unit

3. Hierarchical structure of computer systems

3.1 Five layers

 The so-called virtual machine is when you use a high-level programming language, click to run, and the computer will directly display the running results to you, without letting you experience the process of first compiling into assembly language, then compiling into machine language and finally executing the results. It's as if you are operating a machine that can directly use a high-level programming language, so this machine is called a virtual machine.

3.2 Three levels of language

4. Computer performance indicators

4.1 Memory capacity

4.2 CPU

(1) The clock cycle is the smallest unit of time in the CPU, and each action requires at least 1 clock cycle 

(2) CPU main frequency (clock frequency) is the reciprocal of the clock cycle, reflecting how many digital pulses (clock cycle) appear per second

(3) CPI: the number of clock cycles required to execute an instruction

(4) IPS , how many instructions are executed per second

IPS = main frequency (how many clock cycles per second) / CPI (the number of clock cycles to execute an instruction)

4.3 Others

  • Data path bandwidth: the number of bits of information that can be transmitted in parallel by the data bus at one time (each hardware component transmits data through the data bus)
  • Throughput: refers to the number of requests processed by the system per unit time.
  • Response time: refers to the waiting time from when the user sends a request to the computer to when the system responds to the request and obtains the results it needs.
  • A benchmark program is a utility program used to measure the processing speed of a computer so that the performance of the measured computer can be compared with that of other computers running the same program.

4.4 Common Quantity Units

Guess you like

Origin blog.csdn.net/qq_32241787/article/details/123042005