Basic knowledge of programming required | Principles of Computer Composition articles (08): memory

In computer knowledge base, for some non-majors in college students is concerned, it has been a pain in their hearts, and for technical education students, many students after work, is also aware of shortcomings and lack the knowledge of their own, want to go back Bubu basics. Many courses on computer-based content complicated, but whether it is books or university courses, are a bit out of work. In particular, numerous and basic computer knowledge and want to learn from zero or review are time-consuming.

In view of this, this series of articles will take you faster to make up the necessary basic knowledge of programming, covering the three basic computer knowledge areas: computer composition principle, operating systems, computer networks, these are college computer courses inside the most important content. The content of the article and do a refining summary, abandoned as a programmer does not need knowledge.

The purpose is to:

  • Help you form a computer architecture knowledge
  • Help you understand the underlying principles of computer
  • Help you learn where the practical work of outstanding design

Benpian principles of computer memory is composed of a computer

Welcome attention, forward, favorites, comments

1. What is memory

Memory, as the name implies, is used to store materials. In the computer, these substances is stored data and instructions, with a memory, there is a computer memory.

Some number of the memory units, numbered unit address called. Analogy, memory is like a large warehouse, warehouse there are many rooms to store the goods, each room has its own room number; and a memory unit like the room, the room is like goods data and instructions, and the unit number (address) is like a room number, our address is based on this computer to store or retrieve data and instructions.

All information on the computer, including the original input data, computer programs, intermediate results and final running operation results are stored in the memory.

2. Classification memory

Divided by the storage medium, a semiconductor memory and the memory can be divided into a magnetic memory. Wherein the components are stored in a semiconductor memory composed of a semiconductor, such as common: RAM, U disk, solid-state disks; magnetic memory, is coated with a magnetic material composed of a storage medium, common are: tape, magnetic disk .

According to the way to classify, the memory may be divided into a random access memory (RAM), serial memory, a read only memory (ROM),

3. The memory hierarchy

When selecting the memory of the computer, usually factors to consider are the memory read and write speed, memory capacity, price, and we hope the sooner the better read and write speed, storage capacity, the bigger the better, the price is as low as possible. There is a special unit, to quantify the cost of memory - a median price. Bit monovalent comprehensively the capacity and price are taken into account, and its meaning is the price per bit using the bit cost price can be objectively described memory.

And the read bit value according to the relationship between speed, memory is divided into several levels: cache, main memory, secondary memory.

It refers to a buffer in the CPU registers and a cache, fast bit prices.

Main memory means mainly the computer's memory, moderate speed, affordable.

Auxiliary storage means is an external storage device, such as a magnetic disk, U disk, mobile hard disk, slow speed, low price.

Previous article already mentioned, high-speed operation of the CPU, the processing rate is very fast, but no CPU fast memory, transferring data into the CPU when programs and slow, which causes the CPU often idle waiting for data transfer, both in speed on a mismatch. In theory, regardless of price, we definitely want to cache the bigger the better, but because of the median price, the cache can not do better, so have this hierarchy.

Memory hierarchy as shown below may also be used to express:

Illustrated in, the CPU cache is direct communication can also communicate with main memory. Between the cache and the main memory may communicate with each other, called cache - main memory hierarchy, in addition to the cache - main memory hierarchy, as well as the communication between the main memory and secondary memory, the communication, the CPU is not involved, called main memory - secondary memory hierarchy.

Cache - main memory hierarchy is to increase the speed of a layer between the CPU and main memory of a small capacity fast Cache, aimed at solving problems of main memory and CPU speed mismatch. With the existence of the cache, CPU can, through certain strategies, as much as possible to access the cache instead of main memory, so as to effectively improve the speed and efficiency of the computer's CPU. When the CPU data is selected, it will first fetch from the cache, the cache not, will then pick up the main memory.

Main memory - secondary storage level, is to increase the secondary memory (disk, SD card, U disk, etc.) in addition to the main memory, aimed at addressing the lack of main memory capacity problem. Suppose we run a very large game, but usually only memory 8G, at this time, you can put the game to load data into memory currently in use, the data is not used in auxiliary storage.

Guess you like

Origin www.cnblogs.com/sum-41/p/11578875.html