Random-access memory (Random access Memory, or RAM) is a component that is used to temporarily save data in a computer. It can be read and write at any time, and is very fast, usually as a temporary data storage medium for the operating system or other running programs.
RAM memory can be further divided into static RAM (SRAM) and dynamic Memory (DRAM) of two major categories. SRAM has the advantage of fast access. DRAM is used as the main memory of the system because of its low unit capacity price. However, when the power is off, RAM cannot retain the data, and if data needs to be saved, it must be written to a long-term storage device (such as a hard disk).
The biggest difference between RAM and ROM is that the data stored in RAM after a power outage automatically disappears, and Rom does not. read-only memory (Read-only Memory,rom) is a kind of semiconductor memory, which is characterized by the inability to change or delete data once it is stored.
Often used in electronic or computer systems that do not need to change data frequently, data is not lost due to power off. For example, early PCs such as the XT/AT (operating system) of Apple II or IBM PC, or the firmware (firmware) in various other micro-computer systems.
It is not a permanent storage of data, this kind of memory is what we often say "memory", RAM can be considered as a temporary storage area used in the computer, it can temporarily store the program running the data or information needed to use. Computer RAM is one of the most commonly used components, and it is a very short data storage part, because only when the computer is constantly electricity, ROM data can be saved; If you shut down, the data saved in RAM will be lost. If you or your computer system requires a longer period of data retention, the simple point is to save the data to your hard disk so that you can permanently save the data regardless of whether your system is powered down.
When a computer system loads a program, it loads a piece of data into the computer's RAM for the program to run. Here you can run your program according to your wishes, and he will not change any permanent data information on the computer. This is like when you use a word processor in your computer to edit a report, and you know you have to save it in order to safely save your report, otherwise everything you do will be lost when the computer loses power. When you edit your report by using Notepad, everything is in the ram of the computer before it is saved to the hard disk, which allows you to freely prune the report, and when the report is stored on the hard disk, the information in RAM is converted to permanent data. To use the data again later, you can read the file on the hard disk and reload its contents into computer RAM.
Currently, there are two types of RAM that are widely used, and they are suitable for different purposes. Here's how the two kinds of RAM work and what they are used for.
1:sram (Static RAM) -This type of static RAM runs very quickly and is expensive and relatively large in size. Today we often say that the CPU in the first level, level two cache is the use of this SRAM. Intel's Pentium III Coppermine CPU combines 256KB Full speed two cache, which is actually an SRAM. Unfortunately, this kind of SRAM is very expensive compared to its "partner" DRAM, so only a small amount of SRAM can be used in the CPU to reduce the production cost of the processor, but because of the characteristics of SRAM---high speed, it is very helpful to improve the performance of the system. A first-level cache within the processor that runs at the same frequency as the CPU clock, while a level two cache can be consolidated on the CPU or on the edge of some Slot-1 CPU.
When the system gets a request, it first looks for a cache of the processor, looking for similar information, which is almost always synchronized with the CPU's clock. If the information is in a first-level cache, the CPU will capture this part of the information and no longer go to level two cache or the main memory unit to find to save processing time. The integration of small capacity of the external level or level two SRAM cache will be able to further improve the performance of the CPU.
2:dram (dynamic RAM, active RAM) -dynamic RAM is a type of RAM that we are very familiar with, and we often say that memory (ie, the main memory of the computer system) uses this kind of dynamic RAM. Dynamic RAM is slower than SRAM, but it is also much cheaper than SRAM and can be made larger in capacity, and data stored in DRAM must be constantly rinsed to keep the data intact, otherwise the data will be lost. Each of the smallest units in DRAM is made up of a capacitor, the computer reads the information (1 or 0) to identify whether the data saved in it is changed, and if the capacitance is changed (rinse new), the value read from will be 1, if not changed (rinse new), then read out the value of 0. Because the capacitance value changes (rinse new) very fast, so you need to constantly rinse the new to maintain the integrity of the data, this is the use of a specific rinse new circuit to the DRAM storage data to rinse the new work.
The low price and small volume characteristics of DRAM, which enables it to be used in the main memory of the computer system.