PAE

From ThinkWiki
Revision as of 18:29, 12 March 2017 by TpUser0 (Talk | contribs) (Operating Systems: Note: how is it with 64-Bit?)

Jump to: navigation, search

PAE is a CPU flag, indicating that the processor has support for Physical Address Extension, allowing for more than 4 GB of memory to be addressed.

On a 32-Bit system with a flat memory model the address range is limited to 32 bits worth of memory space: 232 equals a maximum of 4 GB of addressable system memory. Because hardware such as AGP and PCI device addresses also have to fit into this limit, memory is limited to even less than 4 GB, depending on the system e.g. around 3.2 GB (some systems more, some less).

PAE-enabled CPUs use a page table to access more than 4 GB by moving a 32-Bit address window on a larger 36 bits addressing space, which allows memory addressing up to 64 GB (236). Each process will still be limited to a maximum of 4 GB of memory, but the system as a whole is able to address up to 64 GB.

Operating Systems

Modern 32-Bit operating systems rely on Physical Address Extension and don't work without it. Those include (in alphabetical order):

  • Linux with a PAE kernel (ending with -pae)
    • Debian with kernel package linux-image-686-pae
    • Ubuntu starting with 12.04 LTS
  • Mac OS X/Intel
  • Windows 8 32-Bit

Non-PAE Linux kernels use 486, while kernels for 686 most commonly default to PAE since around 2012. Mac OS X/Intel never officially supported non-PAE CPUs. The last Windows operating system to work on non-PAE CPUs is Windows 7 32-Bit.

Note: 64-Bit operating systems don't use or require PAE (yet). In fact, x86-64 (also called amd64 and x64) does the reverse: current 64-Bit x86-CPUs (2003-2017) use a phyiscal address size of 48 bits, allowing 256 TB of memory to be addressed directly (248). In the future, when the limits comes closer, this may be expanded to the full 64 bits. For now, as 48 bits are absolutely sufficient, it makes sense to not have to wire address lanes that will never be used anyhow. Looking into the past, processors such as the Motorola 68EC020 used 24 bits physically while reporting to be a 32-Bit processor to the software. This all makes sense when considering manufactoring costs and the assumption of not using it anyhow.

Processors

To see if a specific CPU supportes PAE, list the contents of /proc/cpuinfo.

processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 13
model name	: Intel(R) Pentium(R) M processor 1.60GHz
stepping	: 6
cpu MHz		: 600.000
cache size	: 2048 KB
fdiv_bug	: no
hlt_bug		: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 2
wp		: yes
flags		: fpu vme de pse tsc msr mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe up bts est tm2
bogomips	: 1199.95
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 32 bits virtual
power management:

This is the cpuinfo of a Dothan core Pentium M of the first generation. Even though it uses a 36-Bit physical address size, pae (as well as nx) is not listed among the provided processor features.

Note: Processors which include pae in the list of flags also include nx (No eXecute), which is the NX-Bit on Intel CPUs.

The one series of processors with internal PAE support but without the CPU flag is the first generation Dothan (Pentium M). For this CPU, PAE can still be used with a modern Linux kernel when using the Kernel parameter forcepae. (The second generation Dothan core and its successors include both CPU flags: pae and nx.)

Note that using a PAE kernel on a system with less then 4 GB of memory will produce a certain overhead and thus has a small impact on performance.

See also