Microsoft's operating system allows 32-bit support for more than 4GB of memory.

Source: Internet
Author: User

First, give a reference: The RAM reported by the System Properties dialog box and the System Information tool are less than you expect in W indows Vista or in Windows XP Service Pack 2 or later version

First, the conclusion:

1. PAE allows the operating system to use more than 4G of physical memory in 32-bit mode.

2 . Regardless of whether PAE is used or not, for a single process, there is a maximum of 4 g of address space visible under a 32-bit system.

3,PAE Advantage is to allow different processes (in different address space) cumulative use of more than 4G of memory , and thus achieve the purpose of using more than 4G of memory.

4, WindowsXP Series although support PAE, but the actual use of the maximum memory limit in 4G, is artificially limited , the reason behind the analysis (the reasons given above are not established, here is a technical reason).

5. Linux can support the use of more than 4G of memory in 32-bit systems in PAE-enabled mode.

And then give the reason, in fact, I originally gave the link content:

This issue occurs because of a, design change in Windows XP SP2, that's also included in Windows Vista. The changes were made to PAE mode behavior to improve driver compatibility.

To reduce driver compatibility issues, Windows Vista and Windows XP Service Pack 2 or a later version include hardware ABS Traction Layer (HAL) changes that mimic the 32-bit HAL DMA behavior. The modified HAL grants unlimited map registers when the computer was running in PAE mode. Additionally, the kernel memory manager ignores any physical address that's more than 4 GB. Any system RAM this is more than the 4 GB barrier would are made unaddressable by Windows and being unusable in the system. by limiting the address space to 4 GB, devices with 32-bit DMA bus master capability would not see a transaction with a n address that's more than the 4 GB barrier.Because These changes remove the need to double-buffer the transactions, they avoid a class of bugs in some drivers that I s related to the correct implementation of double buffering support.


English is longer I would like to explain (the following is limited to x86-32/64bit platform, regardless of other arch):

First of all, science dma:dma the meaning can be understood as: let hardware (such as graphics card, sound card, USB, disk controller, etc.) directly manipulate physical memory, and so on after the completion of the operation to return an interrupt to the operating system, told the operating system said I finished.

The advantage of DMA is: If I want to write data to the disk, the data is already in memory, then the CPU only need to tell the memory address to the disk controller, the rest of the tube, the disk controller after the completion of the write operation will tell the CPU said finished, this period does not delay the CPU to do other things.

What is the relationship between DMA and 4G? Of course it's a relationship, becausenot all memory can be DMA-free.

If you write a 64-bit operating system driver, you should know that some peripherals are not able to access more than 4G of memory address,when some peripherals do DMA, they can access addresses that are below 4G.(If I remember correctly, the USB-EHCI controller seems to be the case).

Therefore, in 64-bit operating systems, all DMA operations are dedicated to a dedicated DMA memory (4G or less) before the operation. In 32-bit systems, there is generally no such limit.

Okay, here's the question:

Microsoft XP is the operating system more than 10 years ago, in the hardware environment, all the memory can do DMA. So in the XP kernel API, do not consider memory can not DMA situation, so, XP in the various drivers, software in writing code, also did not consider the memory can DMA, just use it.

In more than 10 years, the hardware has undergone tremendous changes, and XP due to its strong compatibility, this aspect of the API has not improved. Besides, it's not going to improve, becausemust be binary compatible with old code, and because this compatibility issue continues from XP to Vista, all versions, including Win7, must maintain this compatibility.

Binary compatibility This huge burden makes MS if you really use more than 4G of memory, then there is likely to be a blue screen and other anomalies, because Microsoft does not know how the user's driver code is written, will not directly use memory for DMA.

So, Microsoft forced to limit the memory to 4G below is to maintain the hateful compatibility.

If I give up compatibility, can I? Sure, but it's not XP, it's another version of Windows.

Why is the server version supporting more than 4G of memory? Because the server version of the driver is incompatible with the normal version.

So all the explanations upstairs are wrong,not market positioning or taking care of user sentiment or not letting users do thisButbecause compatibility does not guarantee proper DMA execution(Microsoft also explained clearly, but domestic users seem to have no one to pay attention to).

Some people mention ready for 4G, which can cause some program exceptions, because these programs are running to try to use the physical address directly (many software is such a rogue), and the code to obtain the physical address is 32bit, in some cases, the address obtained in the code is not the actual physical address, and cause the program to crash, to be honest, no blue screen has been very good.

if you want to allow Windows to support more than 4G of memory, then almost all of the drivers are rewritten again, which also includes a large number of third-party unsigned drivers running in the operating system, which is obviously a burden that no one can afford, so 4G of memory is not available on 32-bit systems. Sono, I don't.

It was suggested in the comments that if the driver is specifically identified, the driver for the non-certified drive is restricted to less than 4G, and the certified driver allows the use of an address higher than 4G, is it possible?

The answer is yes. The problem is that it costs a lot, the kernel of each API will be more than one or even a few check the path to determine the driver, and even carefully drive code directly with non-paged memory DMA, so efficiency is a problem, and Microsoft is unable to get all the driver source, For example, the video card manufacturers generally only release binary driver, so, Microsoft can not know what is the driver of the what the little trick. So I had to block the road.

*************************************************************************************************************** ***************************

This is the problem, the 32-bit deadline is 4G, this is a fact that cannot be changed, by what technical means can not change the . Each 32-bit process is exclusive to 4G of virtual address space, where the low 2G is to the user, high 2G is reserved for the system. That is, each 32-bit process, the actual memory can be used less than 2G.

But the application's need for memory is always endless, and it's hard to wait for everything to be in memory, completely without disk IO. Microsoft has two ways to use larger memory for 32-bit systems. One is 4GT, in order to allow the application to use more memory, squeeze the operating system reserved address space, that is, the low 3G left to the user, high 1G to the system, that is, the memory space can be used only a lot of 1G. In this case, however, the total physical memory size supported by the operating system does not change.

The other is that pae,pae, the one mentioned above, does not really address the need for large memory, which is a way to support large memory. First, PAE requires hardware support, that is, the CPU has the relevant instructions to support PAE. Second, and most important, PAE cannot change the upper limit of 4G for each process's virtual address space , but instead allows the operating system to allocate more physical memory. That is, although the total amount of physical memory supported by the operating system can reach 32G, the maximum memory space that each process can use is also 2G, which can reach 3G after the 4GT is turned on, and then it will not go up. This method of using large memory is not very meaningful for ordinary users. After all, the server can also be so, 6G in memory, 2G to the database (process), 2G to cache (process), 2G left to the operating system of other services, through multiple processes to partition large memory. Ordinary home system, playing games is a separate game process requires a lot of memory, and this situation even using PAE can not solve.

So, if our memory requirements are a single process that requires a lot of memory, then 32 bits simply can't meet our needs, and no technical means can be improved. This problem can only be resolved if you upgrade to a 64-bit system. If you want to make the most of large memory on a 32-bit system, you can only use multiple processes, but for the majority of applications that need to use large memory, this approach is also very unreliable, communication between different processes is inefficient, and development is cumbersome, that is, a multi-process program like Chrome can take advantage of.

If Microsoft enables PAE to support more than 4G of memory in a non-server version, it will be cursed by the prevailing trend of public opinion.

Why do I have a 16G memory or not play this memory demand only 4 G of the game Ah!! Microsoft, you big garbage!!!

Complaints like this must be everywhere, Microsoft thankless, why?

Memory Limits for Windows releases (Windows)

References

http://www.zhihu.com/question/22594254

Microsoft's operating system allows 32-bit support for more than 4GB of memory.

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.