The difference between memory and register

Source: Internet
Author: User

Memory in the CPU, generally refers to hard disks, u disk, etc. can be cut off power after the equipment to save data, capacity is generally relatively large, the disadvantage is that the reading and writing speed is very slow, ordinary mechanical hard disk read and write speed is generally 50mb/s around. Memory and register is to solve the memory read and write slow production of multi-level storage mechanism, since the 1950s, the core memory has once become main memory of the primary storage medium, but from the 1970s onwards, gradually replaced by the semiconductor memory, the current computer is using semiconductor memory. Now the DDR2 memory read and write speed is generally 6~8gb/s, and the machine performance is also related.
and register (also known as the cache) is generally referred to by the basic RS trigger structure derived from the D trigger, is a number of non-gate structure, generally integrated in the CPU, its read and write speed and the speed of the CPU basically match, but because of superior performance, so expensive, generally good CPU is only a few MB of level 2 cache , the level 1 cache is smaller. The use of registers can be shortened to 0 lengths, saving storage space, and increasing instruction execution speed. Different registers have different functions, such as: General Register (GR) to hold the operand, the address of the operand or the intermediate result; the instruction register (IR) is used to hold the instruction that is currently executing in order to control the complete function of an instruction during instruction execution.
When the CPU is calculated, the data to be used is pre-read from the hard disk to the memory, and then the data to be used is read to the register. The ideal situation is that the CPU all the data can be read from the register, so read and write speed, if there is no data to use in the register, it is necessary to read from the memory and even the hard disk, so read and write data accounted for more time than the CPU operation time. So to evaluate the performance of a CPU in addition to the frequency, caching is also a very important indicator.

The difference between memory and register

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.