Brief description of computer storage

Computer memory classification

(1) Classification according to the physical properties of the medium
Broadly speaking, under certain conditions, the change of the material properties is the memory of the process conditions. If these physical properties are detectable and have a deterministic one-to-one relationship with their corresponding process conditions, they can be used as memory elements. The memory element should have two clearly defined physical states, one for each of the two basic logical values, and these two states can be detected and converted into electrical signals. The access speed of information depends on the time required to measure and change the memory state of the device. The substances that can meet this requirement are as follows:

  1. Mechanical memory, if there are holes and no holes, with or without pits, can be detected and converted into electrical signals with photocells and lasers.
  2. Electrical (electronic) memories, such as the opening and closing of switches, the presence or absence of capacitance between the capacitor plates, and the positive and negative of the voltage, can be used for electronic signal detection.
  3. Magnetic storage, such as the direction of magnetization, can be detected by electromagnetic induction.
  4. The optical memory uses the presence or absence of light spots to store data.

Memory originals currently used in computers are electronic and magnetic.

(2) Classification by memory performance

  1. Non-permanent memory, also called active memory, is a memory that only loses data after power off. Many semiconductor memories can only save their data in a somewhat environment.
  2. Persistent memory, also called passive memory, is a memory that can only save its data after power off, such as magnetic disk, optical disk, flash memory, etc.

(3) Classification according to the positional relationship between access units

  1. Access memory sequentially. It can only be accessed in a certain order, and the access time is related to the physical location of the access unit. Such as tape.
  2. Random access memory. "Random" here means that the contents of any storage unit can be directly accessed, and the access time is independent of the physical location of the storage unit . Like a magnetic disk, it can read and write data of any sector in any track.

(4) Classification according to read and write restrictions

  1. ROM. Such as a CD.
  2. Random read and write memory. Such as disk, flash memory, etc.

(5) Classification according to the role of memory in the system of the computer

  1. Main memory. Also called memory, it stores a lot of programs and data during the operation of the computer. The main requirement of main memory is faster access speed.
  2. Cache memory. It can be used as a memory to directly access instructions and data at a speed that directly matches the CPU.
  3. Auxiliary storage. Also called external storage, as the main storage of external storage system programs and large data files and databases. The auxiliary storage has a large storage capacity and low cost.

Access by address and structure of main memory

The main memory in the computer is like a medicine box in a traditional Chinese medicine shop-it becomes a storage unit, arranged densely together. The method to put data or instructions in or out of them is to pre-number them and arrange them according to numbers. These numbers are called the address of the storage unit-in the machine with a complement. Insert picture description here
Insert picture description here
The two pictures above are schematic diagrams. Instead of sending the address code directly to each storage unit, the address code is sent to the address decoder, and the address decoder generates the drive signal of the address corresponding unit to read and write the unit.
Insert picture description here
For an n-bit address line decoding, the addressable range is 2 ^ n units, which is the storage capacity. This decoder uses a one-dimensional decoding structure, the decoding method becomes a single decoding, or line selection method, generally used for small-capacity memory. The large-capacity memory adopts a two-dimensional address decoding structure (also called double decoding or duplication), as shown below

Insert picture description here
The decoding structure of the two-dimensional address decoder uses two decoders to perform address decoding in the X (row) and Y (column) directions. This can save the drive circuit and address lines. If the address width is 10, the number of word lines is 2 ^ 10 when using the one-dimensional decoding method, and 1024 drive circuits are required; when the two-dimensional decoding structure is used, the total number of word lines becomes 2x (2 to the 5th power) = 64, requires 64 driver circuits.

The main memory is mainly composed of a storage body, an address decoder, a drive circuit, a read-write circuit and a timing control circuit.
Insert picture description here

Hierarchical storage

At present, computer memory is generally divided into three levels: auxiliary memory (also called external storage, such as optical disks, magnetic disks, U disks, etc.), main memory (also called memory), and Cache (high-speed cache register, referred to as cache). The relationship between them is shown in the following figure:
Insert picture description here
Auxiliary memory is used as a backup of the main memory; the main memory can communicate with the arithmetic unit and the controller (together as a CPU), and can also be used as a backup of the Cache; the Cache stores the most commonly used information of the CPU . Before a program is executed, the program and the data to be executed are stored in the auxiliary memory. When the program starts to execute, the program will be transferred into memory. For large programs, it needs to be transferred into memory for execution. During the execution of the program, the data is transferred into memory according to the needs of the program. In order to improve the execution speed of the program, it is necessary to continuously transfer the program segment and data part currently used by the CPU into the cache for execution.

Published 8 original articles · Likes4 · Visits 290

Guess you like

Origin blog.csdn.net/qq_45521281/article/details/105265150