Computer Organization Review Summary (1): Introduction to Computer Systems

发表于 2021-06-15 18:23 1267 字 7 min read

cos avatar

cos

FE / ACG / 手工 / 深色模式强迫症 / INFP / 兴趣广泛养两只猫的老宅女 / remote

文章系统介绍了计算机的基本概念与发展历程,包括计算机的分类、性能指标、发展规律(如摩尔定律)以及冯·诺依曼体系结构和计算机系统的层次结构。重点阐述了计算机的性能参数(如主频、吞吐量、MIPS、MFLOPS等)和层次化结构从硬件到高级语言的逐级抽象与支持。

This article has been machine-translated from Chinese. The translation may contain inaccuracies or awkward phrasing. If in doubt, please refer to the original Chinese version.

Chapter 1: Introduction to Computer Systems

1.1 Classification of Computers

Electronic Analog Computers

Characteristics: Values are represented by continuous quantities, and the computation process is also continuous

Electronic Digital Computers

Characteristics: Operates on a bit-by-bit basis, with discrete computation steps. Electronic analog computers have limited precision and problem-solving capabilities, with a relatively small range of applications. The term "electronic computers" generally refers to the widely used electronic digital computers. They are further divided into special-purpose computers and general-purpose computers.

  • Special-purpose computers are the most efficient, economical, and fastest computers, but their adaptability is poor.
  • General-purpose computers sacrifice efficiency, speed, and economy, but offer much greater adaptability.

1.2 Brief History of Computer Development (Key Topic)

GenerationComponents UsedPeriod
FirstVacuum tube computers1946-1957
SecondTransistor computers1958-1964
ThirdSmall and medium-scale IC computers1965-1971
FourthLarge and very large-scale IC computers1972-1990
FifthUltra large-scale IC computers1991-present

Since the birth of computers in 1946, approximately every five years the computing speed has increased 10-fold, reliability has improved 10-fold, and physical size has been reduced 10-fold.

Moore's Law

Proposed in 1965 by Gordon Moore (former Intel chairman).

The surface area of transistors (i.e., the area etched onto integrated circuits) shrinks by approximately 50% every 18 months. In other words, the performance of microprocessors doubles every 18 months, while the price drops by half.

1.3 Computer Performance Metrics

Throughput

  • Represents the amount of information a computer can process in a given time interval, measured in bytes per second (B/S).

Response Time

  • A time metric measured from valid input to the system producing a response, expressed in time units such as microseconds (10-6s) or nanoseconds (10-9s).

Utilization

  • Represents the ratio of actual usage time within a given time interval, generally expressed as a percentage.

Processor Word Length

  • Refers to the number of binary digits that can be processed in a single operation by the processor's arithmetic unit. Current processor word lengths include 8-bit, 16-bit, 32-bit, and 64-bit. A longer word length indicates higher computational precision.

Bus Width

  • Generally refers to the number of binary bits in the internal bus that interconnects the CPU's arithmetic unit and memory.

Memory Capacity

  • The total number of storage units in the memory, typically expressed in KB, MB, GB, or TB.
  • Where 1K=210B, 1M=220B, 1G=230B, 1T=240B, 1B=8bit (1 byte). The larger the memory capacity, the more binary data it can remember.

Memory Bandwidth

  • A speed metric for memory, measuring the amount of binary information read from memory per unit of time, generally expressed in bytes per second.

Clock Frequency / Clock Period

  • The CPU's work rhythm is controlled by the main clock, which continuously generates clock signals at a fixed frequency. The frequency of the main clock (f) is called the CPU's clock frequency.
  • Measured in MHz (megahertz) and GHz (gigahertz). For example, Pentium series machines range from 60MHz to 266MHz, while the Pentium 4 reached 3.6GHz.
  • The reciprocal of the clock frequency is called the CPU clock period (T), i.e., T=1/f, measured in microseconds or nanoseconds.

CPU Execution Time

  • Represents the CPU time occupied by executing a program segment, calculated as: CPUExecutionTime=CPUClockCycles×CPUClockPeriodCPU Execution Time = CPU Clock Cycles \times CPU Clock Period

CPI

  • Represents Cycles Per Instruction, i.e., the average number of clock cycles required to execute a single instruction. Calculated as:
  • CPI= \frac{CPU Clock Cycles Required to Execute a Program}

MIPS

  • Represents Millions of Instructions Per Second, calculated as: MIPS = \frac{Number of Instructions}{Program Execution Time\times10^6} = \frac{Clock Frequency}
  • MIPS is the number of instructions executed per unit time, so a higher MIPS value indicates a faster machine. Program execution time Te is: Te= \frac{Number of Instructions}

MFLOPS / TFLOPS

  • MFLOPS represents Millions of Floating-point Operations Per Second, calculated as: MFLOPS= \frac{Floating-point Operations in the Program}
  • MFLOPS is based on operations rather than instructions and can only be used to measure a machine's floating-point performance, not its overall performance. TFLOPS represents Trillions of Floating-point Operations Per Second, a metric generally used for supercomputers.

1.4 Von Neumann Architecture (Key Topic)

The fundamental design concepts of the von Neumann computer: Stored Program and Program Control! It has the following characteristics:

  1. The computer system consists of five major components: arithmetic unit, memory, control unit, input devices, and output devices, with the basic functions of these five parts specified.
  2. The stored program approach is adopted, where programs and data are stored in the same memory (Harvard architecture stores them in separate memories). Both instructions and data can be sent to the arithmetic unit for processing, meaning programs composed of instructions are modifiable.
  3. Data is represented in binary code.
  4. Instructions consist of an operation code and an address code.
  5. Instructions are stored sequentially in memory, with the Program Counter (PC) indicating the address of the instruction to be executed, generally incrementing sequentially but changeable based on computation results or external conditions.
  6. The machine is centered around the arithmetic unit; data transfer between I/O devices and memory goes through the arithmetic unit.

1.5 Hierarchical Structure of Computer Systems

A computer cannot simply be regarded as an electronic device; it is a highly complex whole composed of hardware and software. It typically consists of five or more different levels, each of which is programmable.

Insert image description here

Characteristics of the Hierarchical Structure

  • Programming is possible at each level, supported by the levels below
  • Levels 1 through 3 primarily use binary language, making machine execution and interpretation easy
  • Levels 4 and 5 use symbolic languages, facilitating computer use for people unfamiliar with hardware
  • The lower the level, the closer to hardware; the higher the level, the more convenient computer usage becomes

Level 1: Microprogramming Level

Level 1 is the microprogramming level. This is a real hardware level where microinstructions are directly executed by the machine hardware. If an application is written directly in microinstructions, it can run at this level.

Level 2: General Machine Level

Level 2 is the general machine level, also called the machine language level, where microprograms interpret the machine instruction set. This level is also a hardware level.

Level 3: Operating System Level

Level 3 is the operating system level, implemented by operating system programs. These operating systems consist of machine instructions and extended instructions. Extended instructions are software instructions defined and interpreted by the operating system, so this level is also called the hybrid level.

Level 4: Assembly Language Level

Level 4 is the assembly language level, providing programmers with a symbolic language form to reduce the complexity of program writing. This level is supported and executed by assembler programs. If an application is written in assembly language, the machine must have this level's functionality; if not, this level is not needed.

Level 5: High-Level Language Level

Level 5 is the high-level language level, which is user-oriented and designed to facilitate application programming. This level is supported and executed by various high-level language compilers.

喜欢的话,留下你的评论吧~

© 2020 - 2026 cos @cosine
Powered by theme astro-koharu · Inspired by Shoka