Tuesday, August 25, 2009

32位系统与大内存

朋友新买了台notebook, 内存被加到了4G. 如果问题就出现了:
* vista和ubuntu这两个32位的系统下都只能使用3G的内存.

当是64位的ubuntu又可以支持4G

难度是32位系统的极限?

查了一下, 了解了些知识, 写下来

硬件上, 其实32位的硬件系统也是可以支持4G如上的大存在的, 关于在于CPU的寻址功能, PAE就是CPU的寻址扩展功能:
In computing, Physical Address Extension (PAE) is a feature of some x86 and x86-64 processors that enables the use of more than 4 gigabytes of physical memory to be used in 32-bit systems

*来自: http://en.wikipedia.org/wiki/Physical_Address_Extension

查看CPU是否支持PAE:
jessinio@niolaptop /mnt/sda6/boot $ cat /proc/cpuinfo |grep pae
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx constant_tsc up arch_perfmon bts pni monitor vmx est tm2 xtpr pdcm
* 蓝色的flag就是PAE的支持

重新编译内核, 增加如下选项:
Processor type and features --> High Memory Support

即可支持到更大的内存

64位的CPU本身支持4G以上的内存:
Larger physical address space: Current implementations of the AMD64 architecture can address up to 1 TB (240 or 1,099,511,627,776 bytes) of RAM; the architecture permits extending this to 4 PB (252 or 4,503,599,627,370,496 bytes) in the future (limited by the page table entry format). In legacy mode, Physical Address Extension (PAE) is included, as it is on most current 32-bit x86 processors, allowing access to a maximum of 64 GB (236or 68,719,476,736 bytes).
* 来自: http://en.wikipedia.org/wiki/X86-64
可以看出, 64位的CPU也是继续扩展.

关于64位CPU的称呼:
1. The x86-64 specification was designed by Advanced Micro Devices (AMD), who have since renamed it AMD64. The first family of processors to support the architecture was the AMD K8
family of processors. This was the first time any company other than
Intel made significant additions to the x86 architecture. Intel was
forced to follow suit, introducing modified NetBurst family processors, initially referred to as "IA-32e" or "EM64T" and now called Intel 64 and almost identical to AMD64.
2. AMD licensed its x86-64 design to Intel, where it is marketed under the name Intel 64 (formerly EM64T).

* 两种称呼, 一个鸟样


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.