Principles of Computer Composition (1) Introduction to Computer Systems

foreword

The course of computer composition principles can be said to be the most important foundation of computer majors. As a computer major, it is very important, so you need to think about it yourself and don't take the exam.

Composition and classification of computer hardware

The main components of the computer hardware system are divided into five parts, which are memory, arithmetic unit, controller, input device and output device.

Briefly describe the working principle of the computer. Assuming that a computer is used to calculate a math problem, the computer memory first records the math problem and stores the original information of the problem. The calculator performs addition, subtraction, multiplication and division operations on the stored data, and the controller controls Throughout the calculation process, the input device sends the original problem-solving information to the computer, and the output device presents the calculation results.

Typical von Neumann computer architecture

The basic idea of ​​von Neumann structure

  1. Programs and data are encoded in binary and stored in memory in a binary manner, and binary encoding is also a code that computers can recognize and execute.
  2. Programs, data, and instruction sequences are all stored in memory in advance, so that the computer can extract instructions from memory at high speed and analyze and execute them when it is working.
  3. Five basic components of a computer are identified: arithmetic unit, controller, memory, input device, and output device.
  4. The early von Neumann machines were centered on arithmetic units , and the most fundamental feature was the use of the "stored program" principle, and the basic working mode was the control flow driving mode.

Modern computer organization
is memory-centric

calculator

The arithmetic unit is the execution unit of the computer, which is used to process the data.
The arithmetic unit performs arithmetic and logic operations (ALU).
Computers usually use binary numbers, because there are only two numbers, 0 and 1, which can represent the level of voltage and the presence or absence of pulses, and electronic devices are easy to implement.

memory

Memory is the storage part of a computer that stores programs and data.

Before the data is stored in the memory, it has become binary code, and the storage is also full of binary code. At present, semiconductor devices are used to store it. This is because the semiconductor flip-flop has two states of 0 and 1, and can memorize a binary code. If If a number is expressed in 16-bit binary code, 16 flip-flops are required. These 16 flip-flops are called storage units. The memory is composed of many storage units. Each storage unit has a number and is called an address.
Storage capacity: the total number of all storage units of the memory, in units of KB, MB, etc.
External storage: disk storage and optical disk storage with larger storage capacity
So semiconductor storage is also called memory storage, or memory for short.

controller

The controller is the command center of the computer, which controls the various components to work automatically and harmoniously.

Programs and Instructions

Complicated computing operations can not only be calculated with a calculator, but also need to be controlled by a controller to control each calculation step.

Instructions : perform basic operations such as addition, subtraction, multiplication, and division.

A sequence of instructions is called a computing program, or program for short.

Each instruction has a clear goal, let the memory know which storage unit to fetch data from, and what kind of operation to perform, so the instruction consists of two parts, namely the operation code and the address code, which respectively represent the nature of the operation and the address of the operand.

Note that the operation code is also expressed in binary, such as the operation code of the addition instruction is 001.

Stored program : After the instruction is digitized, it can be stored in the memory and stored separately from the data. The instruction sequence stored in the memory is called a stored program. Stored programs are executed in address order, which is the design idea of ​​von Neumann computers.

Von Neumann structure : Instructions and data are placed in the same memory
Harvard structure : Instructions and data are placed in two memories respectively
Obviously, the computer of the Harvard structure is faster.
A variety of basic instructions constitute the instruction system of the computer, and the instruction system is an important symbol to measure the performance of the computer.

Basic tasks of the controller

The basic tasks of the controller: fetch instructions one by one, decode instructions, and execute instructions in a certain order.

Fetching cycle and execution cycle: respectively, a period of time for fetching instructions and a period of time for executing instructions.
The arithmetic unit and controller are usually combined in a single integrated circuit chip called a central processing unit (CPU).

instruction flow and data flow

The controller can completely distinguish which are instruction words and which are data words. Generally speaking, the information flow read from the memory during the instruction fetch cycle is the instruction flow, which flows to the controller; while the information flow read from the memory during the execution cycle is the data flow, which flows from the memory to the arithmetic unit.

Adapters and I/O Devices Input Devices

Transform a certain information form that people are familiar with into a binary information form that can be received and recognized inside the machine. Output device: Transform the results of computer processing into an information form that can be received and recognized by humans or other machine equipment. Adapter (interface): it Make the connected peripheral devices communicate with the host computer through the system bus, so that the host computer and the peripheral devices can work in parallel and coordinately.

Composition and Classification of Computer Software

Computer software is divided into two categories: system programs and application programs.
System programs are used to simplify program design, including 4 categories

  1. Various service programs: diagnostics, troubleshooting, etc.
  2. Language program: assembly, compilation, interpretation, etc.
  3. operating system
  4. database management system

Application programs are programs compiled by users to solve certain problems with computers,
such as engineering design programs, data processing programs, automatic control programs, enterprise management programs, information retrieval programs, and scientific computing programs.

Hierarchy of Computer Systems

image.png
Level 1 : Microprogramming level, where microinstructions are directly executed by machine instructions. If the application program is written in microinstructions, it can run at this level.

Level 2 : General machine level, also known as machine language level, where the machine instruction system is interpreted by microprograms.

Level 3 : The operating system level is implemented by operating system programs. These operating systems are composed of machine instructions and generalized instructions. Generalized instructions are software instructions defined and interpreted by the operating system. This level is also a mixed level.

Level 4 : Assembly language level, which provides programmers with a symbolic formal language to reduce the complexity of programming. This level is supported and executed by the assembler.

Level 5 : High-level language level, which is user-oriented and set for the convenience of users to write applications. This level is supported and implemented by various high-level language compilers.

Performance indicators of computer systems

Throughput : The amount of information that a computer can process in a certain time interval, in bytes/second (B/S)
Response time : The time measurement between the input being valid and the system generating a response, measured in units of time , such as microseconds (10-6S), nanoseconds (10-9S).
Utilization : Indicates the ratio of the time that the system is actually used within a given time interval, expressed as a percentage.
Machine word length: refers to the number of bits in a processor arithmetic unit that can complete binary number operations at a time. Such as 8 bits, 16 bits...
Bus width : generally refers to the binary digits of the internal bus interconnected between the arithmetic unit and the memory.
Memory capacity : the total number of all storage units in the memory, such as KB, MB, GB, TB, PB, EB.
Memory bandwidth : The speed index of the memory, the amount of information read from the memory per unit time, generally expressed in bytes/second (B/S).
Main frequency/clock cycle : The smallest unit of the CPU, and the working cycle of the CPU is controlled by the main clock. The frequency (f) of the main clock is called the main frequency of the CPU. The unit is MHz, GHz clock cycle T=1/f
CPI : the number of clock cycles required to execute an instruction.
MIPS : The average number of millions of vertex instructions executed per second.
FLOPS : How many floating point operations are performed per second.

calculate

CPU execution time : CPU time occupied by executing a program
CPU execution time = total number of clocks Nc × clock cycle T
Total number of clocks Nc = number of clock cycles required to execute an instruction (CPI) x total number of instructions (lc)
CPU Execution time = CPI × Ic × T
MIPS = number of instructions / execution time x 10^6 = clock frequency / CPI x 10^6
FLOPS = floating point operands in the program / program execution time

Equivalence of hardware and software logic

  • With the development of large-scale integrated circuit technology and the trend of software hardening, the boundaries between software and hardware of computer systems have become blurred. Because any operation can be realized by software or by hardware; the execution of any instruction can be completed by hardware or by software.
  • Any operation can be implemented by software or hardware (when designing a computer system, various factors should be considered: price, speed, reliability, storage capacity, change cycle)
  • Expansion of physical hardware machine functions
  • The concept of firmware (software in function, hardware in form)

Guess you like

Origin blog.csdn.net/btufdycxyffd/article/details/128183669