Detailed explanation of the relationship between 4G memory and CPU, bios, and operating system

Source: Internet
Author: User

This article comes from http://www.vista123.com/

As memory prices continue to decline, major memory manufacturers have successively launched a single 2 GB DDR2 800 memory, which gives the biggest impression that the price is cheap and sufficient. Many users buy two 2 GB memory directly and want to create a dual-channel. You can check that the original 4 GB memory size is only about GB. Check to find that the memory itself is normal. So what swallowed up your memory? This is a clear question we will give you in this issue.

Is MB memory swallowed?

You may find a strange phenomenon. In Windows XP and Vista, after 4 GB of memory is installed, only about GB or even less is displayed, the memory of more than 800 mb disappears for no reason, which is confusing. The reason why the motherboard and operating system cannot use all 4 GB of memory is, the root cause of the problem lies in the 32-bit X86 architecture of the computer. The 32-bit X86 architecture means that the address bus of a personal computer is 32-bit, And the CPU, memory controller, and operating system are all designed based on the 32-bit address bus. The 32-bit address bus supports 4096 MB memory address code, that is, 4 GB address code, which can be compiled into 4 GB addresses. The 4 GB address code can be allocated to 4 GB memory. However, these 4 GB address codes cannot all be allocated to the physical memory installed on the motherboard. Because the personal computer still has many devices that need address code, so that the CPU can find them according to the address code. Meanwhile, the CPU and these devices need to temporarily store the data in the memory -- register, these registers also require address code. Such as hard drive controller, soft drive controller, PCI Bus Controller managing PCI cards inserted in the PCI slot, PCI-E bus controller and PCI-E graphics card, both have registers that need to be assigned to them by the system address code. These addresses are allocated by the system, which is invisible to computer users. In this way, when we add 4 GB memory to the computer, some of the memory cannot be allocated with the address code.

To gain an in-depth understanding of the 4 GB memory puzzle, we need to figure out the relationship between each part and the 4 GB memory. The components involved include CPU and memory controller (Intel Platform is integrated in beiqiao, AMD platform integrated in CPU) and operating system.
CPU, memory controller, BIOS: 4 GB supported

CPU supports 4 GB memory

From the 386 era, the address bus of the CPU is 32-bit and can access the 4 GB address code. From Pentium II to Pentium IV, we can theoretically access the 64 GB address code. Later, the 64-bit architecture of Pentium IV was supported to the current Core 2, the address bus has been upgraded to 64-bit, And the 64-bit address bus can access the address code of GB. In fact, we can't use so many address buses. Generally, 42 BITs are enough. The address size that can be encoded is 4 TB. When the 64-bit CPU is used in a 32-bit system, the address bus is reduced to 36 bits. Therefore, it is no problem that the CPU supports 4 GB of memory.

Address Bus of the Memory Controller

The memory controller is directly associated with the memory installed on the motherboard. The memory controller manages the memory while communicating with the CPU through the address bus. The address bus of the Memory Controller determines the number of memory address encodings that can be supported, and the address line of the memory controller's actual connection to the memory determines the memory capacity that can be supported. Intel places the memory controller on beiqiao, and AMD places the memory controller on the CPU. So we need to separate them.

1. Intel Memory Controller

Because Intel's memory controller is placed in the North Bridge, the change in memory controller is closely related to the North Bridge. Starting from p965, the memory controller is already a 36-bit address bus. You can compile 64 GB address code. In addition to the address code occupied by the system, more than 4 GB memory allocated to the motherboard for installation. Therefore, starting from p965, Intel's North Bridge supports 4 GB memory.

 2. AMD Memory Controller

AMD has integrated the memory controller into the CPU from a 64-bit CPU (athlon64. The address bus of the memory controller is a 64-bit architecture. It uses 40 BITs and supports Gbit/s address encoding. Therefore, AMD has started from athlon64 and the Memory Controller supports 4 GB of memory.

BiOS supports 4 GB memory

BIOS is not developed by the motherboard manufacturer. The copyright of BIOS is controlled by several companies such as AMI. They work with Intel and AMD to develop BIOS. So when Intel and AMD propose a "ing" Method to Solve the 4 GB memory problem, Ami and other vendors will develop the corresponding BIOS. The "ing" option is displayed in the early bios. You can enable or disable it. This setting is enabled by default and is no longer displayed. So it can be said that for the current bios, it is okay to support 4 GB memory.
4 GB memory: X86 architecture

The CPU and memory controller provide a hardware guarantee for the use of 4 GB memory. But the problem of 4 GB memory has not been solved yet. The obstacle comes from the 32-bit X86 architecture, the system standard of personal computers. As early as the 8086 era, the memory was soldered on the motherboard, usually several KB of memory. IBM specified that the 640kb address is the highest-end address, which is allocated to the BIOS, next, a segment of IP addresses are allocated to the system's display devices and I/O devices. The rapid development of computers quickly broke through the 640kb memory reached and more than 1 MB. However, the address distribution under 640kb cannot be changed, because the CPU and DOS Operating Systems read the BIOS from 640kb and display the device storage address below 640kb, the storage address of the I/O device communicates with the display device and the I/O device, and exchanges data. If changed, all previous computers will be voided. Therefore, you must find a way to do not change the 640kb Address allocation, but also use the 640kb to 1mb memory. That is, this address allocation rule remains unchanged. The "memory address ing" technology is used to map the address segment from 640kb to over 500 kb to the space of 640kb-1mb. the BIOS is responsible for the ing. The operating system is responsible for the two doscommands himem. sys and emm386.sys. Users familiar with DOS will know these two commands. By ing, more memory can be used by the DOS software. The development of memory to 4 MB and 16 Mb is achieved through the "memory ing" technology. Up to now, as long as the PC is compatible with DOS, it must comply with the address memory allocation rule of 640kb.

In the Pentium II era, the memory capacity of SDRAM reaches 128 MB. At that time, the address bus was 32-bit and the maximum address space was 4 GB. At this time, the 32-bit X86 architecture was fully formed. In addition to retaining the previous Memory Address Allocation Rules, you also need to map the BIOS address to the top of the address space-4 GB. Till the DDR memory in the 815 age, and DDR2 memory in the 915 age. The maximum memory size for a single use is 512 MB, and the system uses no more than 2 GB memory. Therefore, the 4 GB memory issue is not apparent.

In the 945 era, when the 1 GB DDR2 memory appeared, the memory controller designers began to consider installing a 4 GB memory stick on the motherboard. However, at that time, few users used 4 GB memory, and the 4 GB memory problem remained unhighlighted.

In fact, Intel proposed to solve the problem of 32-bit X86 architecture hardware supporting 4 GB memory during the 915 period. When p965 is officially solved, the solution is still "memory address ing ". This solution is not new. It has already been used in 32-bit X86 server systems, but has been transplanted to personal computers.

From the top of the 64 GB address space, map the I/O address of the PCI device, and then map the 3 GB to 4 GB address occupied by the system. Leave the address code from 3 GB to 4 GB to the physical memory installed on the motherboard to use all the installed memory.

Why do we have to adopt a "ing" approach? Because the address of the memory must be continuous and cannot be disconnected. The system's address space (also called Logical Address) can be discontinuous. Just like we give the house number cards on both sides of the street, the scheme (equivalent to the logical address) can be planned very large and can be divided. The number plates for houses in this street must be consecutive. This is the real address so that people can find houses by address.

Of course, this "ing" work is still done by the BIOS. To support 4 GB memory, you must also support BIOS.

The 4 GB address occupied by the system is returned to the physical memory through memory address re ing, which is a 32-bit X86 architecture rule. AMD also uses this rule, although its memory controller is integrated into the CPU. Because the memory controller is integrated into the CPU, beiqiao no longer contains the memory controller. When developing the amd platform motherboard, the motherboard manufacturers will design the memory capacity supported by the motherboard based on market positioning. It supports 2 GB, 4 GB, 8 GB, or more. Therefore, the amd platform's 4 GB problem depends on the motherboard.

Operating systems are the "culprit"

The operating system manages and uses physical memory. Therefore, there must be a logical (virtual) address system in the operating system, it corresponds to all the storage addresses on the motherboard (including memory, I/O devices, and BIOS) and has a structure similar to "Address Bus. The 32-bit operating system is designed based on the 32-bit address bus and uses 32-bit address registers. Therefore, only 4 GB addresses can be managed. The occupied system cannot use all 4 GB memory. 32-bit operating systems on PCs do not support 4 GB memory, even Vista 32 SP1 does not. Vista 32 SP1 is a little better than XP 32 SP3. It shows the actual installation quantity in the system attributes.

The 32-bit vista sp1 can successfully identify 4 GB memory, but the task manager can see that the system actually uses less than 4 GB memory.

* Which operating systems can support and use 4 GB memory? The first is the 64-bit operating system, because the 64-bit operating system is designed based on the 64-bit address bus. For example, Windows XP 64 and Vista 64. Second, server operating systems with physical address extensions and address registers greater than 32 bits, but some server operating systems with physical address extensions, because the address register is limited to 32 bits, it cannot support 4 GB.

Finally:

We can see that the current Motherboard chipset or memory controller is no longer the main reason for consuming our memory. The culprit is the 32-bit operating system we use. Although the current vista sp1 can recognize the complete 4 GB memory, the actual memory usage is no different from the previous 3 GB memory. So it is too early to talk about the popularization of 4 GB memory. On the other hand, some memory manufacturers have launched three 1 GB memory combo sets to avoid Memory waste, which is also a very considerate design.

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.