Joke Collection Website - Mood Talk - Ask a question about memory. Thanks!

Ask a question about memory. Thanks!

As an indispensable and important core component of PC-memory, it has been accompanied by DIY hardware for many years. From 30pin SIMM memory in the 286 era, 72pin SIMM memory in the 486 era, to EDO DRAM memory in the Pentium era, SDRAM memory in the PII era, to DDR memory in the P4 era and DDR2 memory in the current 9X5 platform. Memory is constantly updated in terms of specifications, technology, bus bandwidth, etc. However, we have reason to believe that the upgrading of memory remains the same, and its purpose is to increase the bandwidth of memory to meet the ever-increasing bandwidth requirements of the CPU and avoid becoming a bottleneck for high-speed CPU operations. So, what kind of exciting life does memory have in the PC field? Let us learn about the history of memory development together.

1. Historical Origin - Memory Stick Concept

If you observe carefully, video memory (or cache) is easily visible on current DIY hardware, such as graphics card memory, hard disk Or the cache size of the optical drive directly affects the performance of the device, and the register may be the most representative of PC hardware devices that cannot be separated from RAM. Indeed, if there is no memory, the PC will not be able to operate, so memory has naturally become the focus of discussion among DIY users. topic.

In the beginning, the memory used on the PC was a piece of IC. In order for it to serve the PC, it had to be soldered to the motherboard, but this also brought trouble to later maintenance. problem, because once a certain memory IC is broken, it must be soldered before it can be replaced. Since the soldered IC is not easy to remove, and the user does not have soldering knowledge (welding requires mastering the soldering technology, and the risk is also high ), which seems too troublesome to repair.

Therefore, PC designers have introduced modular memory sticks, each of which integrates multiple memory ICs. At the same time, corresponding memory slots are also designed on the motherboard, so that the memory sticks can be installed at will. After disassembly (as shown in Figure 1), memory maintenance and upgrades become very simple. This is the source of the memory "bar".

Tips: The main function of memory (Random Access Memory, RAM) is to temporarily store data and instructions. We can write data to RAM memory and read data from RAM at the same time. Since memory has always been one of the biggest performance bottlenecks in the system, from a certain perspective, improvements in memory technology are even more exciting than CPU and other technologies.

……………………

I will not repost the unfinished part above. I personally think it is very comprehensive at the following URL:

< p>/Html/histroy/20060907817.html

I’ll give you some reference, although I don’t support writing papers and moving things from the Internet.

When the DOS operating system was first designed, the PC hardware system only supported an addressing space of 1M bytes, so DOS could only manage a maximum of 1M bytes of continuous memory space. Of this 1M memory, only 640K is reserved for application use, which is called conventional memory or basic memory. The other 384K is called high-end memory and is reserved for video display and BIOS. In 1982, 640K of memory was more than enough for a microcomputer, and people even thought that 640K of memory could be used for anything. It seems ridiculous now, but at the time, it was true.

The current situation is that even if your computer is equipped with several megabytes or dozens of megabytes of memory, if you use a DOS operating system, you only have 640K of memory that can be used directly, and more than 1M of memory requires It can be used through some memory management tools. Fortunately, Windows 95 no longer has conventional memory restrictions. All your memory, whether 8M or 128M, can be used directly.

Under DOS, there are the following four types of memory in the system:

Conventional Memory;

Upper Memory;

Expanded Memory;

Extended Memory.

Conventional memory refers to the memory area of ??0-640K. Under DOS, general applications can only use the system's conventional memory, and are therefore subject to the 640KB memory limit. And because DOS itself and the device driver installed in the config.sys file and the memory-resident program executed in the autoexec.bat file all occupy some conventional memory, the conventional memory that the application can use is less than 640K. Many times, we have to find ways to organize the memory to leave enough conventional memory for some applications with relatively large "appetites". This must be the most familiar to many computer enthusiasts in the DOS era.

High-end memory refers to the 384K memory located above conventional memory. Programs generally cannot use this memory area, but EMM386.exe can activate part of the high-end memory, and it allows users to load certain device drivers and user programs into high-end memory using Devicehigh or LH (ie loadhigh). dos=high,umb also installs part of DOS into high-end memory. Umb here is the abbreviation of Upper Memory Block.

Expanded memory is an early standard for increasing memory, which can be expanded up to 32M. To use expanded memory, a special expanded memory board must be installed in the computer, and a management program for managing the expanded memory board must also be installed. Because expanded memory was introduced before expanded memory, most programs are designed to use expanded memory but not extended memory. Because expanded memory is cumbersome to use, it was eliminated soon after the appearance of expanded memory.

Extended memory can only be used on 80286 or higher-level machines. Currently, almost all machines using DOS have more than 1M of memory as extended memory. Extended memory cannot be used directly by DOS. DOS 5.0 and later provides Himem.sys, an extended memory management program, through which we can manage extended memory. emm386.exe can simulate expanded memory (XMS) into expanded memory (EMS) to meet some programs that require the use of expanded memory.

Finally, let me emphasize that no matter how large the expanded memory or extended memory is, DOS applications can only run under conventional memory. Some programs can put the CPU into protected mode through a DOS extender (such as DOS4GW.exe and other programs), thereby directly accessing the extended memory; however, it should be noted that after entering protected mode, the computer will leave the DOS state.

In the structure of a computer, there is a very important part, which is memory. Memory is a component used to store programs and data. For computers, only with memory can they have memory functions and ensure normal operation. There are many types of memory, which can be divided into main memory and auxiliary memory according to their uses. Main memory is also called internal memory (referred to as memory). Memory plays a decisive role in computers. Memory generally uses semiconductor storage units, including random access memory (RAM), read-only memory (ROM), and cache (CACHE). Simply because RAM is the most important memory among them. S (SYSNECRONOUS) DRAM synchronous dynamic random access memory: SDRAM is 168 pins, which is the memory currently used by PENTIUM and above models. SDRAM locks the CPU and RAM together through the same clock, so that the CPU and RAM can share a clock cycle and work synchronously at the same speed. The rising edge of each clock pulse begins to transfer data, which is faster than EDO memory. Improved by 50%. DDR (DOUBLE DATA RAGE) RAM: an updated product of SDRAM, which allows data to be transmitted on the rising and falling edges of the clock pulse, thus doubling the speed of SDRAM without increasing the clock frequency.

●Memory

Memory is where programs and data are stored. For example, when we use WPS to process documents, when you type characters on the keyboard, it is stored In the memory, when you choose to save, the data in the memory will be saved to the hard (disk) disk. Before further understanding it, you should also understand its physical concept.

●Read Only Memory (ROM)

ROM stands for Read Only Memory. When ROM is manufactured, information (data or programs) is stored and made permanent. save. This information can only be read and generally cannot be written. Even if the machine is powered off, the data will not be lost. ROM is generally used to store basic computer programs and data, such as BIOS ROM. Its physical appearance is generally a dual in-line plug-in (DIP) integrated block.

●Random Access Memory (RAM)

Random Access Memory means that data can be read from or written to. When the machine is powered off, the data stored in it is lost. The memory module we usually buy or upgrade is used as computer memory. The memory module (SIMM) is a small circuit board that collects RAM integrated blocks. It is inserted into the memory slot in the computer to reduce RAM integration. The space occupied by the block. Common memory modules currently on the market include 128M/module, 256M/module, 512M/module, etc.

●Cache (Cache)

Cache is also a concept we often encounter. It is located between the CPU and the memory. It is a memory that reads and writes faster than the memory. When the CPU writes or reads data into memory, this data is also stored in the cache. When the CPU needs the data again, the CPU reads the data from the cache memory instead of accessing the slower memory. Of course, if the required data is not in the Cache, the CPU will read the data in the memory again.

After you understand the above concepts, you may ask, memory is memory, why do various memory terms appear? What is going on?

Before answering this question, let’s take a look at the following paragraph.

Physical memory and address space

Physical memory and storage address space are two different concepts. However, since the two are very closely related, and both use B, KB, MB, and GB to measure their capacity, it is easy to cause confusion. It will help beginners to understand these two different concepts to further understand the internal memory and make good use of it.

Physical memory refers to the specific memory chip that actually exists. For example, the memory module installed on the motherboard and the ROM chip loaded with the system BIOS, the display RAM chip and the ROM chip loaded with the display BIOS on the display card, and the RAM chips and ROM chips on various adapter cards are all physical memories.

Storage address space refers to the range of memory encoding (encoding address). The so-called encoding is to assign a number to each physical storage unit (one byte), usually called "addressing". The purpose of assigning a number to a storage unit is to facilitate finding it and completing the reading and writing of data. This is called "addressing" (so some people also call the address space an addressing space).

The size of the address space and the size of the physical memory are not necessarily equal. Let's take an example to illustrate this problem: There are 17 rooms on a certain floor, numbered 801~817. These 17 rooms are physical, and their address space uses a three-digit code. The range is 800~899***100 addresses. It can be seen that the address space is larger than the actual number of rooms.

For microcomputers of 386 and above, the address bus is 32 bits, so the address space can reach 232 or 4GB. But in fact, the physical memory we configure is usually only 1MB, 2MB, 4MB, 8MB, 16MB, 32MB, etc., which is far smaller than the range allowed by the address space.

Okay, now we can explain why there are different memory types such as: regular memory, reserved memory, upper memory, high-end memory, expanded memory and extended memory.

Various memory concepts

What needs to be made clear here is that the different memory concepts we discuss are based on the addressing space.

The first PC launched by IBM used the 8088 chip, which had only 20 address lines, that is to say, its address space was 1MB.

PC designers use the low-end 640KB of 1MB as RAM for DOS and applications, while the high-end 384KB is reserved for ROM, video adapter cards and other systems. Since then, this boundary has been established and is still used today. The low-end 640KB is called conventional memory, which is the basic RAM area of ??the PC. The lower 128KB of reserved memory is the display buffer, the upper 64KB is the system BIOS (Basic Input/Output System) space, and the remaining 192KB is reserved. Judging from the corresponding physical memory, the basic memory area only uses 512KB chips, occupying the 512KB addresses from 0000 to 80000. Although the display memory area has 128KB space, only 4KB is enough for a monochrome display (MDA card). Therefore, only a 4KB physical memory chip is installed, occupying the 4KB space from B0000 to B10000. If a color display (CGA card) is used, ) needs to install 16KB of physical memory, occupying 16KB of space from B8000 to BC000. It can be seen that the actual address range used is smaller than the allowed address space.

At that time (late 1980 to early 1981) such a "large" capacity of memory seemed to be enough for PC users. However, as programs continued to grow, images and sounds continued to change. With the advent of new CPUs that were rich and capable of accessing larger memory spaces, the limitations of the original PC and MS-DOS designs became increasingly apparent.

1. What is expanded memory?

How EMS works

By 1984, shortly after 286 was generally accepted, people increasingly realized that the 640KB limit had become an obstacle to large programs. At this time, Intel and Lotus , these two outstanding representatives of hardware and software, have jointly developed a solution that combines hardware and software. This method makes it possible for all PCs to access more than 640KB of RAM. Microsoft had just launched Windows and had high requirements for memory space, so it joined the ranks in time.

In early 1985, Lotus, Intel and Microsoft jointly defined LIM-EMS, the expanded memory specification. EMS is usually called expanded memory. At that time, EMS required a memory expansion card installed in the I/O slot and an expansion memory management program called EMS to be used. However, the address line of the I/O slot is only 24 bits (ISA bus), which is not suitable for 32-bit machines of 386 and above. Therefore, memory expansion cards are rarely used now. Nowadays, the expanded memory in microcomputers is usually used by using software such as EMM386 in DOS to simulate or expand the memory. Therefore, the difference between expanded memory and expanded memory is not its physical memory location, but the method used to read and write it. This will be further introduced below.

As mentioned before, extended memory can also be simulated and converted from extended memory. The principle of EMS is different from XMS. It adopts page frame method. The page frame specifies a 64KB space in 1MB space (usually in the reserved memory area, but its physical memory comes from extended memory), divided into 4 pages, each page is 16KB. EMS memory is also paged by 16KB, and 4 pages of content can be exchanged at a time. In this way, all EMS memory can be accessed. There are many drivers that comply with EMS, and commonly used ones include EMM386.EXE, QEMM, TurboEMS, 386MAX, etc. EMM386.EXE is provided in both DOS and Windows.

2. What is extended memory?

We know that the 286 has a 24-bit address line, which can address an address space of 16MB, while the 386 has a 32-bit address line, which can address an address space of up to 4GB. For the sake of distinction, we put The address space above 1MB is called extended memory XMS (eXtend memory).

In microcomputers of 386 and above, there are two memory working modes, one is called real address mode or real mode, and the other is called protection mode. In real mode, the physical address still uses 20 bits, so the maximum addressing space is 1MB for compatibility with the 8086. The protection method uses 32-bit physical address, and the addressing range can reach 4GB.

The DOS system works in real mode, and the memory space it manages is still 1MB, so it cannot directly use extended memory. To this end, Lotus, Intel, AST and Microsoft have established standards for the use of extended memory under MS-DOS, namely the extended memory specification XMS. Himem.sys, which we often see in the Config.sys file, is the driver that manages extended memory.

The appearance of the extended memory management specification is later than the extended memory management specification.

3. What is the high-end memory area?

In real mode, the address of the memory unit can be recorded as:

Segment address: offset within the segment

Usually written in hexadecimal as XXXX :XXXX. The actual physical address is formed by shifting the segment address left by 4 bits and adding the intra-segment offset. If all bits of the address are 1, it is FFFF:FFFF. Its actual physical address is: FFFFFFF=10FFEF, which is about 1088KB (16 bytes less), which exceeds the 1MB range and enters the extended memory. This area that goes into extended memory is about 64KB, the first 64KB of space above 1MB. We call it the high-end memory area HMA (High Memory Area). The physical memory of HMA is obtained from extended memory. Therefore, to use HMA, physical extended memory must exist. In addition, the establishment and use of HMA requires the support of the XMS driver HIMEM.SYS, so HMA can only be used after HIMEM.SYS is loaded.

4. What is upper memory?

In order to explain the concept of upper memory, we have to look back at the reserved memory area. The reserved memory area refers to the 640KB~1024KB (***384KB) area. This part of the area was clearly reserved for the system when the PC was born, and user programs cannot intervene. But this part of the space is not fully used, so everyone wants to make plans for the remaining part and divide it into an address space (note: it is an address space, not a physical memory) to use. So we got another memory area UMB.

UMB (Upper Memory Blocks) is called upper memory or upper memory block. It is generated by occupying the remaining unused space in the reserved memory. Its physical memory is still taken from the physical extended memory, and its management driver is the EMS driver.

5. What is SHADOW (shadow) memory?

For attentive readers, you may also find a problem: how to use the 640KB ~ 1024KB physical memory of a machine equipped with 1MB or more physical memory. Since this part of the address space has been allocated for system use, it cannot be reused. In order to make use of this part of physical memory, in some 386 systems, a relocation function is provided, that is, the address of this part of physical memory is relocated to 1024KB ~ 1408KB. In this way, this part of physical memory becomes extended memory, which can of course be used. However, this relocation function is no longer used in today's high-end machines, and this part of the physical memory is reserved as Shadow memory. The address space that Shadow memory can occupy is the same as the corresponding ROM. Shadow consists of RAM, which is significantly faster than ROM. When the contents of the ROM (various BIOS programs) are loaded into the Shadow RAM at the same address, the BIOS can be accessed from the RAM without having to access the ROM. This will greatly improve system performance. Therefore, when setting CMOS parameters, the corresponding Shadow area should be set to Enabled.

6. What is odd/even parity?

Odd/Even Check (ECC) is a method used to correct data errors during data transmission. It is divided into two types: odd check and even check.

If odd parity is used, an additional bit is added as a check bit when transmitting each byte. When the number of "1"s in the actual data is an even number, this check bit It is "1", otherwise the check bit is "0", which ensures that the transmitted data meets the odd parity requirements.

When the receiver receives the data, it will detect the number of "1"s in the data according to the odd parity requirements. If it is an odd number, it means that the transmission is correct, otherwise it means that the transmission is wrong.

Similarly, the process of even parity is the same as that of odd parity, except that the number of "1"s in the data is detected to be an even number.

Summary

After the above analysis, the division of internal memory can be summarized as follows:

●Basic memory occupies 0~640KB address space.

●Reserved memory occupies 640KB~1024KB address space. Allocated to the display buffer memory, ROM on each adapter card and system ROM BIOS, the remaining space can be used as upper memory UMB. The physical memory of UMB is taken from the physical extended memory. This range of physical RAM is available as Shadow RAM.

●Upper memory (UMB) is created using the unallocated address space in the reserved memory, and its physical memory is obtained from the physical extended memory. UMB is managed by EMS, and its size can be set by the EMS driver.

●High-end memory (HMA) expands the first 64KB area in memory (1024KB~1088KB). Built and managed by HIMEM.SYS.

●XMS memory is an extended memory area managed in compliance with XMS specifications. Its driver is HIMEM.SYS.

●EMS memory is an expanded memory area managed in compliance with EMS specifications. Its driver is EMM386.EXE, etc.