Home  Memory

Jul 13 2019

What is Computer Memory? Types of Computer Memory

Ⅰ Introduction

This video going to trace the history of these storage technologies from punch cards, delay line memory, core memory, magnetic tape, and magnetic drums, to floppy disks, hard disk drives, cds, and solid state drives. 

Catalog

Article Core

Computer Memory Basic

Introduction

Computer Memory Characteristics

Four Categories of Computer Memory

RAM (random access memory)

ROM (read-only memory)

External Computer Memory/Storage

FLASH

Specific Classification Standards

1) According to Storage Media

2) According to Storage Type

3) According to Read and Write Function

4) According to Information Storage

5) According to Functions

Selection

Basic Principles

1. Internal memory and external memory

2. Boot ROM

3. Configuration memory

4. Programme memory

5. SRAM, EEPROM

6. Volatile and non-volatile memory

7. Serial memory and parallel memory

8. EEPROM and FLASH

9. EEPROM and FRAM

10. Cloud storage


Terminology

Computer memory is a kind of physical device in a computer system that stores programs and data. All information in the computer, including the input raw data, computer programs, intermediate run results, and final run results are stored in memory, which stores and retrieves information based on the location specified by the controller. It stores information temporarily or permanently, and most memory devices use integrated circuits to operate systems, software, and hardware.

computer memory basics

The main function of the memory is to store programs and various data of computers, and to access programs or read data at high speed automatically during computer operation. A memory is a device with a "memory" function that uses a physical device with two stable states to store information, and these devices are also referred to as memory elements. The data is represented in the computer by a binary with only two digits "0" and "1". The two stable states of the memory element are denoted as "0" and "1", respectively. And the decimal number used daily must be converted to an equivalent binary number to be stored in memory. Various characters processed in the computer, such as English letters, arithmetic symbols, etc., are also converted into binary code to be stored and manipulated.

The storage media constituting the memory is mainly a semiconductor device and a magnetic material. The smallest unit of storage in computer memory is a bistable semiconductor circuit or a CMOS transistor or magnetic material storage element that stores a binary code. A storage unit is composed of a plurality of storage elements, and then a memory is composed of a plurality of storage units. A memory contains a number of memory units, each of which can hold one byte. Each memory unit has a number, that is the address, which is usually expressed in hexadecimal. The sum of the data that all memory cells in a memory can hold is called storage capacity. For example, an address code of a memory consists of a 20-bit binary number (ie, a 5-digit hexadecimal number), it can represent 220, that is, 1M memory cell addresses. Each memory unit stores one byte, and the memory has a storage capacity of 1 KB.


Ⅱ Computer Memory Characteristics

Computer memory: storage of programs and data

Storage bit: a storage unit that stores a binary digit, which is the smallest storage unit of the memory.

Memory word: when a number (n-bit binary bit) is stored or retrieved as a whole, it is called a memory word.

Storage unit: a plurality of memory units storing a storage word form a storage unit.

Bank: a collection of a large number of storage units that make up a memory bank.

Storage unit address: the number of the storage unit.

Word addressing: addressing the memory unit.

Byte addressing: bytes are addressed to a memory location.

Addressing: find data by addressing and fetching data from the storage unit of the corresponding address.


Ⅲ Four Categories of Computer Memory

RAM (random access memory)

Random access memory is an internal memory that exchanges data directly with the CPU, also called main memory (memory). It can be read and written at any time quickly, often acting as a temporary data storage medium for operating systems or other running programs.

Characteristics

"Random access" is meant that when the data in the memory is read or written, the time required is independent of the written location or the information location. In contrast, when reading or writing information in a sequential access storage device, the time and location required are related. It is mainly used to store operating systems, various applications, data, and so on.

Volatile: RAM cannot retain data when the power is turned off. If you need to save data, you must write them to a long-term storage unit (such as a hard disk) in SRAM. Compared with RAM and ROM, the biggest difference between the two is that the data stored in the RAM will automatically disappear after the power is turned off, and data in the ROM will not disappear automatically, and can be saved for a long time.

Sensitive to static electricity: Like other sophisticated integrated circuits, random access memories are very sensitive to the static charge of the environment. Static electricity can interfere with the charge of the capacitors in the memory, causing data loss and even burning the circuit. Therefore, touch the metal ground with your hand before touching the random access memory.

Access speed: Random access memory is the fastest to write and read on almost all access devices in modern society, and access latency laptop memory is insignificant compared to other storage devices that involve mechanical operations.

Refresh (regenerate): Modern random access memories rely on capacitors to store data. When the capacitor is fully charged, it represents 1 (binary), and represents 0 when uncharged. Due to the more or less leakage of the capacitor, the data will gradually disappear over time without special treatment. The refresh is the state in which the capacitor is read during the specified period, and then the capacitor is recharged according to the original state to make up for the lost charge. The need to refresh just explains the volatility of random access memory.

ROM (read-only memory)

The read-only memory is generally written before the whole machine is loaded, and the computer data can only be read during the working process, instead of being rewritten quickly and conveniently like the random access memory. The data stored in the ROM is stable, and does not change after the power is off; its structure is simpler and data reading is more convenient, so that it is often used for storing various fixed programs and data.

Characteristics

The characteristic of read-only memory is that it can only read out information that cannot be written arbitrarily. A basic input/output system is solidified in the ROM on the motherboard, which is called BIOS (basic input/output system). Its main function is making the power-on self-test of the system, the initialization of each functional module in the system, driving system of the basic input/output driver, and guide to the  operating system.

External computer memory/storage

External memory refers to storage other than computer memory and CPU cache. Such storage can still save data after power off. Common external memories include hard disks, floppy disks, optical disks, and USB flash drives. 

FLASH

FLASH, also known as flash memory, is also a rewritable memory. Some books refer to FLASH memory as FLASH ROM, but its capacity is generally much larger than EEPROM, and when erasing, it usually takes multiple bytes for the unit.

The difference between NOR and NAND characteristics is mainly due to whether the internal "address/data line" is separated. The address line and the data line of the NOR are separated, and the data of the NAND is shared with the address line.

NOR FLASH: Generally used in code storage, such as program memory space inside the embedded controller.

NAND FLASH: Generally used in large data storage, including SD card, U disk and solid state hard disk.

computer memory types

Ⅳ Specific Classification Standards

1) according to storage media

Semiconductor memory: A memory composed of semiconductor devices.

Semiconductor memories can be easily divided into volatile memory and non-volatile memory. Volatile memory has not changed much in the past few decades, and static random access memory (SRAM) and dynamic random access memory ( DRAM) are the mainstay, but non-volatile memory is constantly emerging with new technologies. In addition to the charge trap memory, there are ferroelectric memories (FRAM), phase random access memory (PRAM), magnetic random access memory (MRAM), and resistive random access memory (RRAM).

Magnetic surface memory: a memory made of a magnetic material.

2) according to storage type

RAM: The contents of any memory location can be accessed randomly, and the access time is independent of the physical location of the memory location.

Sequential memory: Data and programs can only be accessed in a certain order, and the access time is related to the physical location of the storage unit.

3) according to read and write function

ROM: A semiconductor memory that is stored in a fixed state and can only be read but not written.

RAM): A semiconductor memory that can both read and write.

4) according to information storage

Non-permanent memory: A memory that disappears after power off.

Permanent memory: A memory that retains information even after power off.

5) according to functions

Depending on the role of the memory in the computer system, it can be divided into a main memory, an additional memory, a cache memory, a control memory, and so on.

In order to solve the contradiction between the capacity, speed and cost of the memory, a multi-level memory architecture is generally adopted, that is, a cache memory, a main memory and an external memory are used.

use and characteristic

Access instruction and data access speed of cache is fast, but its storage capacity is small. The access speed of a large number of programs and data which kept in main memory are fast during computer operation, but the storage capacity is not large. Large-scale external storage memory for large data files and databases, with low main internal storage capacity, the cost is low.

RAM

Ⅴ Memory Selection

Basic Principle

1. Internal memory and external memory

In general, after determining the storage space required to store the program code and data, the design engineer will decide whether to use internal or external memory. Often, internal memory is the most cost-effective but least flexible, so design engineers must determine if the demand for storage will grow in the future, and if there is some way to upgrade to a microcontroller with more code space. Based on cost considerations, people typically select the microcontroller with the smallest memory capacity to meet the application requirements. So the size of the code must be selected carefully, as increased code size may require replacement of the microcontroller.

Characteristics

  • They are semiconductor memories.

  • It is known as the main memory.

  • Usually volatile memory.

  • Data is lost in case power is switched off.

  • It is the working memory of the computer.

  • Faster than secondary memories.

  • A computer cannot run without the primary memory.


There are various types of external memory devices on the market, and it is easy to fit in the increase in code size by adding memory. Sometimes it means replacing the existing memory with a larger-capacity memory of the same package size, or adding memory to the bus. Even if the microcontroller has internal memory, the system's need for non-volatile memory can be met by adding external serial EEPROM or FLASH memory.

Characteristics

  • They are magnetic and optical memories.

  • It is known as the backup memory.

  • It is a non-volatile memory.

  • Data is permanently stored even if power is switched off.

  • It is used for storage of data in a computer.

  • Computer may run without the secondary memory.

  • Slower than primary memories.


2. Boot ROM

In larger microcontroller systems or processor-based systems, the design engineer can initialize with boot code. The application itself usually determines if boot code is needed or a dedicated boot memory is needed. For example, if there is no external addressing bus or serial boot interface, internal memory is typically used without a dedicated boot device additionally. However, in some systems that do not have internal program memory, initialization is part of the operation code, so all code will reside in the same external program memory. In addition, some microcontrollers have both internal and external addressing buses, in which case the boot code will reside in internal memory and the operational code will be in external memory. This is probably the safest method because the boot code is not accidentally modified when the action code is changed. In fact, the boot memory must be non-volatile memory.

3. Configuration memory

For field programmable gate arrays (FPGAs) or system-on-a-chip (SoCs), people use memory to store configuration information. This memory must be a non-volatile EPROM, EEPROM or flash memory. In most cases, the FPGA uses the SPI interface, but some older devices still use the FPGA serial interface. Serial EEPROM or flash devices are the most commonly used, and EPROM is used less.

4. Programme memory

All systems with processors use programme memory, but the design engineer must decide whether the memory is internal or external to the processor. After making this decision, the design engineer can further determine the capacity and type of memory. Of course, sometimes the microcontroller has both an internal programme memory and an external addressing bus, thus the design engineer can choose to use either or both of them. This is why the problem of choosing the best memory for an application is often complicated by the choice of the microcontroller and why changing the size of the memory will also result in selecting what microcontrollers.

If the microcontroller utilizes both internal memory and external memory, internal memory is typically used to store code that changes infrequently, while external memory is used to store code and data that are updated more frequently. Design engineers also need to consider whether the memory will be reprogrammed online or replaced with new programmable devices. For applications that require reprogramming, microcontrollers with internal flash memory are often used, but microcontrollers with internal OTP or ROM and external flash or EEPROM also meet this requirement. To reduce costs, external flash can be used to store code and data, but care must be taken to avoid accidental code changes when storing data.

In most embedded systems, people use flash storage programs to upgrade firmware online. Older applications with stable code can still use ROM and OTP memory, but due to the versatility of flash memory, more and more applications are turning to flash.

5. SRAM, EEPROM

Similar to program memory, the data memory can be internal to the microcontroller or an external device, but there are some differences between the two. Sometimes the microcontroller contains both SRAM (volatile) and EEPROM (nonvolatile) data memory, but sometimes does not contain internal EEPROM. In this case, when it is necessary to store a large amount of data, the design engineer can choose external serial EEPROM or serial flash device. Of course, parallel EEPROM or flash memory can also be used, but usually they are only used as programme memory.

When an external high-speed data memory is required, a parallel SRAM is typically selected and an external serial EEPROM device is used to meet the requirements for non-volatile memory. In addition, some designs also use flash devices as programme memory, but retain one sector as a data store. This approach reduces cost, space, and provides non-volatile data storage.

For non-volatile memory requirements, serial EEPROM devices support the I2C, SPI, or Microwire, while serial flash memory typically uses the SPI bus. Due to the fast write speed and the I2C and SPI serial interfaces, FRAM is used in some systems.

6. Volatile and non-volatile memory

The memory can be divided into volatile memory or non-volatile memory, the former will lose data after power off, and the latter is the opposite. Design engineers sometimes use volatile memory with a backup battery to behave like a non-volatile device, but this can be more expensive than simply using a non-volatile memory. However, for systems that require very large memory capacities, DRAMs with backup batteries may be a way to meet design requirements and be cost effective.

In systems with continuous energy supply, either volatile or non-volatile memory can be used, but the final decision must be made based on the likelihood of power outage. Volatile memory can be used if the information in the memory can be recovered from another source while power is restored.

Another reason to choose volatile memory to use with the battery is speed. Although nonvolatile memory devices can hold data while power is off, writing data (one byte, page or sector) takes longer.

7. Serial memory and parallel memory

After defining the application system, the choice of microcontroller is a factor in determining the choice of serial or parallel memory. For larger applications, the microcontroller usually does not have enough internal memory space. In this case, external memory must be used because the external addressing bus is usually parallel,  as well as the external program memory and data memory.

Smaller applications typically use a microcontroller with internal memory but no external address bus. If additional data memory is required, external serial memory devices are the best choice. In addition, this extra external data memory is non-volatile in most cases.

Depending on the design, the boot memory can be serial or parallel. Parallel non-volatile memory devices are the right choice for most applications if the microcontroller does not have internal memory. For some high-speed applications, however, an external non-volatile serial storage device can be used to boot the microcontroller and allow the main code to be stored in internal or external high-speed SRAM.

8. EEPROM and FLASH

The maturity of memory technology has blurred the boundaries between RAM and ROM, and today there are some types of memory (such as EEPROM and FLASH) that combine the features of both. These devices read and write like RAM and save data like a ROM when power off. They are electrically erasable and programmable, but each has their advantages and disadvantages.

From a software perspective, separate EEPROM and FLASH devices are similar. The main difference between the two is that the EEPROM device can be modified byte by byte, while the FLASH device only supports sector erase and words, pages or sectors to the erased cell. The area is programmed. Reprogramming FLASH memory also requires the use of SRAM, so it requires more devices to work in a longer period of time, which requires more battery power. The design engineer must also confirm that SRAM with sufficient capacity is available when modifying the data.

9. EEPROM and FRAM

The design parameters of EEPROM and FRAM are similar, but FRAM has very high read/write times and fast write speed. However, in general, users will still choose EEPROM instead of FRAM, mainly due to cost (FRAM is more expensive), quality and availability. Design engineers often use lower cost serial EEPROMs unless durability or speed is a necessary system requirement.

Both DRAM and SRAM are volatile memories. Although both types of memory can be used as programme memory and data memory, SRAM is mainly used for data memory. The main difference between DRAM and SRAM is the lifetime of data storage. As long as the power is off, SRAM can maintain its data, but DRAM has a very short data life, usually around 4 milliseconds.

DRAM seems to be useless compared to SRAM, but the DRAM controller inside the microcontroller makes DRAM performance the same as SRAM. The DRAM controller periodically refreshes the stored data before the data disappears, so the contents of the memory can be kept as long as possible.

Due to the low bit cost, DRAM is often used as programme memory, so applications with large storage requirements can benefit from DRAM. Its biggest drawback is its slow speed, but computer systems use high-speed SRAM as a cache to compensate for DRAM speed defects.

10. Cloud storage

Compared with traditional storage, cloud storage systems have the following advantages: excellent performance supports high concurrency, bandwidth saturation utilization. The cloud storage system separates the control flow and the data flow. When the data is accessed, multiple storage servers provide services at the same time to achieve high concurrent access. Automatically balance the load of different clients access to different storage servers. System performance increases linearly with increasing node size. The larger the system, the more obvious the advantages of the cloud storage system, and there is no performance bottleneck.

Use multiple copies of data blocks for highly reliability to multiple files, and data has multiple block copies on different storage nodes. If any node fails, the system will automatically copy the data block to the new storage node. The data is not lost, so that the data is complete and reliable; the large file is super reliable (S3) code algorithm to achieve high reliability, in addition, arbitrarily damage multiple storage nodes at the same time, the data can be automatically recovered by the super memory algorithm decoding. This feature can be applied to situations where data security is extremely high, and the reliability implementation of copy redundancy greatly improves disk space utilization. Less than 40% of disk redundancy, damage any three node storages at the same time without losing data.

The metadata management node adopts the high availability mode of dual-machine mirror hot backup, if one of the servers fails, it can seamlessly and automatically switch to another server, and the service is uninterrupted. There is no single point of failure in the entire system, and hardware failures are automatically shielded. Online scaling can dynamically join new storage nodes without stopping the service. The system capacity can be smoothly expanded from terabytes to petabytes without any operation. Any node can be removed, and the system automatically scales down without loss data, and automatically back up the data on the next node to other nodes to ensure the redundancy of the entire system data. All management tasks of the cloud storage system are completed by the cloud storage system management monitoring center, and the user can easily manage the entire system without any special knowledge. Using professional distributed cluster monitoring subsystem, all nodes are continuously monitored, and the user can clearly understand the operation of each node through the interface.


You May Also Like

The Working Principle and Classification of Semiconductor Memory

The Function, Structure and Working Principle of Cache Memory

What Are the New Memory Technologies and What Problems Can They Solve?

5 comments

    • Edwin Camilo on 2019-7-30 16:06:51

    Actually your notes made my student enjoy the subject because almost every step is self explanatory! This is great.

    • Holy. M on 2019-8-10 10:22:18

    Nice info, but i have a question, can you give me the difference between register and memory?

    • Addison on 2019-8-10 10:38:21

    What is the difference between physical memory and storage address space?

    • Bernard on 2019-8-10 11:23:51

    Very nice article. Want to learn more in Electronics.

    • Robert on 2019-8-10 11:32:43

    Great! What a good explanation! Simply outstanding.

Leave a Reply

Your email address will not be published.

 
 
   
Rating: