Linux Kernel---Memory

Source: Internet
Author: User

I. Memory INTRODUCTION

Memory, also known as primary memory, is the storage space that the CPU can directly address, which is made of semiconductor devices. It is a bridge to communicate with the CPU. All programs in the computer run in memory, so the performance of the memory affects the computer very much.

It is used to temporarily store the operational data in the CPU, as well as the data exchanged with external memory such as the hard disk. As long as the computer is running, the CPU will transfer the data needed for operation into memory, and when the operation is completed, the CPU will transmit the result, and the running of the memory determines the stable operation of the computer.

Memory is characterized by fast access, memory is the main part of the computer, it is relative to the external memory. We usually use the program is installed on the hard disk and other external memory, but only this is not able to use its function. They must be called in memory to run, in order to really use its function, we usually input one end of the text, or play a game, in fact, are running in memory. Like in a study, books are stored in bookshelves and bookcases equivalent to computer external memory, and our working desks are memory. We usually store a large amount of data to be stored on external memory, and put some temporary or small amount of data and programs in memory;

Two. Memory classification

1. Read-only memory (ROM)

ROM represents read-only memory, and when the ROM is made, the information (data or program) is stored and stored permanently. This information can only be read, and the data will not be lost even if the machine is out of power. ROM is typically used to store basic computer programs and data, such as BIOS ROM. The storage time is independent of the physical address.

2. Random Memory (RAM)

Random memory, which indicates that data can be read from, or can be written to. When the machine power is off, the data stored in it will be lost, mainly for short-time use of the program, storage time and physical address independent.

Three. Buffer memory (Cache)

Buffer memory is a primary memory that exists between main memory and CPU, consisting of a static memory chip (SRAM), a smaller capacity but much higher than main memory, close to the CPU speed, because I/O device to main memory request level is higher than the CPU, so the CPU waits for I/O device to visit the phenomenon , in order to avoid the CPU and I/O device scrambling for the visit, main memory to the CPU to take the information forward to the cache, once the host and I/O device Exchange, the CPU can directly from the cache to read data, avoid null and so on.

Four. Composition of memory

Primary memory (memory or main storage) includes memory m, registers (MAR,MDR), various logic components and control circuits, etc. The storage unit consists of a number of storage units, each storage unit consists of multiple storage elements, each storage element can be stored in a binary code (0/1), a storage unit can store a string of binary code, called the string binary code is a storage word, the binary code length is stored in words. Each storage unit has a number called the address number of the storage unit.

Main memory works by the address number of the storage unit to achieve the storage of the word (write), take (read out), this access is called Address access mode. Two registers Mar and MDR are configured in main memory. MAR-----Memory address Register is used to store the address of the pre-access storage unit, the number of bits corresponding to the number of storage units (such as Mar is 10 bits, 2 of 10 square = 1024 storage units); MDR-----Memory Data registers, Used to store code taken out of a unit of storage or ready to be deposited into a storage unit, with the same number of bits as the storage word length.

Linux Kernel---Memory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.