Principles of Computer Composition (4)---Memory

Chapter 4 Memory

4.1 Overview

4.1.1 Memory classification

  1. Classification by storage media

    1. Semiconductor memory TTL and MOS features: small size, low power consumption, fast speed (volatile: will disappear without power)
    2. Magnetic surface memory head , magnet carrier (non-volatile)
    3. Core memory hard magnetic materials, ring components (non-volatile)
    4. Optical disk storage laser, magneto-optical materials (non-volatile)
  2. Classified by access method

    (1) Access time has nothing to do with physical address (random access)

    • Random Access Memory ( RAM ) is readable and writable during program execution

    1. Its characteristic is that the contents of any storage unit of the memory can be accessed randomly, and the access time has nothing to do with the physical location of the storage unit.
    2. Mainly used for main memory and cache memory

    • Read Only Memory**(ROM)** ​​Read only

    1. Features: The stored content can only be read, but cannot be rewritten.
    2. Usually used to store fixed programs, eg: BIOS chip.

    (2) The access time is related to the physical address** (serial access)**
    • Sequential access memory eg: tape

    1. When reading/writing, you need to find the address in the order of physical location.

    • Direct access to memory disk

    1. The magnetic head first finds the corresponding track, and then accesses it sequentially until the position is found.
  3. Classified by the role of memory in computers

    Insert image description here

4.1.2 Memory hierarchy

Why have a hierarchy? What is the role of hierarchy?

1. The relationship between the three main characteristics of memory

[The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-mgLOK2QZ-1624236515222)(J:\typora\image-20210527194036003.png)]

2. Cache main memory level and main memory auxiliary memory level

Insert image description here

  • The cache-main memory hierarchy mainly solves the problem of mismatch in speed between CPU and main memory.
  • The main memory-auxiliary memory hierarchy mainly solves the problem of insufficient main memory storage capacity.

*4.2 Main memory

4.2.1 Overview

4.2.1.1 Basic components of main memory

[The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-PcLnBZMK-1624236515226)(J:\typora\image-20210527195543650.png)]

4.2.1.2 Relationship between main memory and CPU

[The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-EsnSSyLl-1624236515228)(J:\typora\image-20210527195604070.png)]

4.2.1.3 Allocation of storage unit addresses in main memory (memory addressing scheme)

Word-addressed computer: The smallest unit of information addressable by a computer is a storage word . The number of binary digits contained in a storage word is called the storage word length . Note: The unit of access when addressing by word is the word length.
Byte-addressable computers: The smallest unit of information addressable by a computer is a byte . Note: The unit of access when addressing by byte is one byte.

In computer systems, in order to meet the needs of character processing, 8-bit binary is often used to represent a byte, so the storage word length is a multiple of 8. That is, 8 bits represent a byte.

[The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-MRE9wMIa-1624236515230)(J:\typora\image-20210527201707920.png)]

  • In the IBM 370, the word address is represented by the address of the high-order byte (048) of the word. The word length is 32 bits, that is, each storage word can contain 4 independently addressable bytes.

  • In PDP-11, the word address is represented by the address of the low-order byte (048) of the word. The word length is 16 bits, that is, each storage word can contain 2 independently addressable bytes.

  • [The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-0FfyUxcq-1624236515230)(J:\typora\image-20210527203122506.png)]

    • The 24 address lines address each byte, and each byte corresponds to an address.
    • MW represents 1M words. A word is 8 bits. If the word length is 16 bits, two bytes are one word. The word length is 32 bits, so four bytes are one word.
  • Insert image description here

4.2.1.4 Technical indicators of main memory

  1. Storage capacity The total number of bits of binary code stored in main memory

    Calculation: Storage capacity = number of storage units * storage word length ** (total number of digits to store binary code) **

    Or: storage capacity = number of storage units * storage word length / 8** (total number of bytes)**

  2. Storage speed (expressed by access time and access cycle)

    • **Access time:**The entire time required from starting a memory operation to completing the operation (divided into read time and write time)
    • **Reading time:**The entire time required from when the memory receives a valid address to when it generates a valid output
    • **Writing time:**The entire time required from when the memory receives a valid address to when data is written to the selected unit
    • **Access cycle:** The minimum time required between two consecutive independent memory operations (read or write)
    • **Note:** Usually the access cycle is greater than the access time, access cycle = access time + recovery time
  3. Memory bandwidth (closely related to access cycle)

    • Definition: The amount of information accessed by memory per unit time
    • Unit: Word/second Byte/second or bit/second
      Methods to improve memory bandwidth:
      (1) Shorten the access cycle (2) Increase the storage word length (3) Increase the memory bank

4.2.2 Introduction to semiconductor memory chips

4.2.2.1 Basic structure of semiconductor memory chip

[The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-EZgqRbkm-1624236515231)(J:\typora\image-20210527205711564.png)]

[The external link image transfer failed. The source site may have an anti-leeching mechanism. It is recommended to save the image and upload it directly (img-JkeuqDne-1624236515232)(J:\typora\image-20210527211533041.png)]

  • One is called the chip select signal, and the other is called the enable signal, cs, chip select. S is select, CE is the enable signal, and E is enable. The chip will only work if the chip select is selected. The chip select knowledge selects the chip but does not use it. The signal is also not working.

4.2.2.2 Semiconductor detection chip decoding driver

  • Line selection method
  • Double law

4.2.3 Random Access Memory (RAM)

According to the principle of storing information, it is divided into two types, static RAM and dynamic RAM.

  1. Static RAM (SRAM)

    1. Static RAM storage principle: using flip-flop working principle to store information
    2. Features: After the information is read out, it remains in its original state and does not require regeneration; after a power outage, the information is lost.
    3. The access speed is fast, but the integration level is low and the power consumption is high. It is generally used to form a cache memory.
  2. Dynamic RAM** (DRAM)**

    Dynamic RAM storage principle: the principle of capacitor storing charge to store information

    Features:

    1. Stored information needs to be reproduced or refreshed;
    2. High integration and lower power consumption.

4.3 Cache memory

  • slightly

4.4 Auxiliary memory

  • slightly

Guess you like

Origin blog.csdn.net/qq_45372719/article/details/118079188