Computer System Architecture - Introduction
Knowledge Points
- Hierarchical structure of computer systems
- Computer architecture, computer organization, and implementation of computers
- Trade-offs between hardware and software as well as quantitative design principles
- The impact of software, applications, and devices on system architecture
- Parallel development in system architecture and classification of computer systems
Knowledge Difficulty:
Each knowledge point is marked with a ※ to indicate mastery level and type.
※: Indicates that the knowledge point and concepts can be remembered;
※※: Understanding, requires comprehension and interpretation, capable of digesting and absorbing, can provide correct explanations, descriptions, and discussions of the knowledge points.
※※※: Simple application, capable of applying course knowledge points, such as calculations, drawings, to analyze, implement, and solve general application problems.
※※※※: Comprehensive application, requiring the ability to utilize multiple knowledge points from the course to solve complex problems.
Assessment Content Outline
1. Hierarchical Structure of Computer Systems 【※】
Classification
From the perspective of programming languages, modern general-purpose computer systems are classified as follows (Level 0-5):
Translation and Explanation
Virtual machines and physical machines:
A machine fully implemented by software is a virtual machine, while a machine implemented by hardware or firmware is a physical machine.
Simulation: Instruction sets interpreted by microprograms.
Translation technology: A technique where a conversion program transforms an entire program from a higher-level machine level into an equivalent program at a lower machine level, which is then executed at the lower machine level.
Interpretation technique: A technique where a string of statements or instructions at a lower machine level simulates the functionality of a statement or instruction at a higher machine level, achieved by逐一 interpreting each statement or instruction in the higher machine level language program.
Note that translation is a one-time process;
Interpretation technology can read one line of higher-level language code, execute it, then read and execute the next, allowing for step-by-step execution of the code in the program.
2. Definition and Research Aspects of Computer Architecture, Organization, and Implementation 【※※】
Definitions and Research Aspects of Computer Architecture, Organization, and Implementation
Computer architecture: Also known as the architecture of computer systems, it is the definition of the various levels of interfaces in a computer system and the allocation of their functions.
Computer architecture refers to the machine-language-level aspect of traditional machine languages, which is the intersection of hardware and software.
Transparency: If an objectively existing entity or attribute is not visible from a certain perspective, it is said to be transparent.
Different levels of program developers perceive different attributes of computers, so system architecture needs to study which attributes at a particular level should be transparent and which should not.
Research aspect: Computer architecture studies the functional distribution between hardware and software and the determination of traditional machine-level interfaces.
Computer organization: Refers to the logical implementation of computer architecture, including the composition of internal data flow and control flow at the machine level and logical design.
When designing computer organization, consider:
-
Width of data paths;
-
Setup of specialized components;
-
Degree of sharing among components for various operations;
-
Parallelism of functional components;
-
Composition method of control mechanisms;
-
Buffering and queuing techniques;
-
Prediction and forecasting techniques;
-
Reliability techniques.
Computer implementation: Refers to the physical realization of computer organization, including the physical structure of physical machines, main memory, the integration and speed of components, the division and connection of devices, modules, plugs, and backplanes, design of specialized devices, micro-assembly technology, signal transmission, power supplies, cooling, and overall assembly techniques.
The attributes of computer architecture include (not to be memorized):
-
Data representation including types and formats that hardware can directly recognize and process;
-
Addressing methods such as minimum addressable unit, types of addressing, and address computation;
-
Register organization including settings, quantity, word length, and usage conventions of general/special registers;
-
Instruction system including operation types, formats, ordering methods, and control mechanisms for binary or assembly instructions;
-
Organization of storage systems including minimum addressable units, addressing methods, capacity, and maximum addressable space for main memory;
-
Interrupt mechanisms including classification and hierarchy of interrupts, functionalities of interrupt handlers, and entry addresses;
-
Definitions and transitions between kernel mode and user mode at the system machine level;
-
Machine-level I/O structure including connections, usage methods, flow, operation completion, and error indications for input/output devices;
-
Information protection methods and mechanisms for system components.
Relationship and Impact of Architecture, Organization, and Implementation
The characteristic of computer architecture is its hierarchical structure, focusing on the traditional machine language level;
Computer organization looks at the sequencing of internal events, control mechanisms, the functions of various components, and the relationships between components.
Computer organization focuses on device technology and micro-assembly technology.
The distinctions among the three relationships can be somewhat complex.
Quantitative Design Principles of Computer Systems
1. Huffman Compression Principle
Speed up the processing of high-probability events as much as possible, as this significantly improves performance compared to accelerating lower-probability events. For example, CPU caches, program caches, optimizing certain instruction sets for CPU calculations.
2. Amdahl's Law
This law is used to determine the degree of improvement in system performance due to the bottleneck component after measures are taken to enhance performance, known as the system speedup factor.
This enhancement is denoted as Sₚ.
The ratio of the time consumed by the component that can improve performance to the total operational time required by the system is fnew. 0 ≤ fnew ≤ 1.
For example, if a program can read and output image text, and the time to read the image is 4 seconds while the overall operation requires 10 seconds, then fnew = 4 / 10.
The speedup ratio for the upgraded component is the ratio of the original running speed of the component to the speed after improvement, denoted as rnew. rnew ≥ 1.
If it originally took 4 seconds to read the image, and now it takes only 1 second, then rnew ≥ 4 / 1.
Total speedup ratio = Original execution time / Improved execution time.
Under the condition of given time, it is first converted to a ratio.
Example Problem:
A program has many functions, one of which reads data from a database and displays it on the interface. This function takes 8 seconds to execute, while the total time for the program to operate all functions is 60 seconds.
Calculate fnew = 8 / 60;
After optimizing the program logic and SQL, the execution time of this function is reduced to only 1 second.
Calculate rnew = 8 / 1;
From this, it can be seen that the required speedup factor for this function is 8 times the original, but for the overall system, the improvement is only 13%.
3. Locality of Reference Law in Program Access
The locality of reference in program access includes both spatial and temporal aspects. Temporally: programs may execute certain parts most of the time and repeatedly execute others; spatially: multiple pieces of information may be adjacent, and the currently and future used information may also be in proximity.
文章评论