3 GB barrier

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

In computing, the term 3 GB barrier refers to a limitation of some 32-bit operating systems running on x86 microprocessors. It prevents the operating systems from using all of 4 GB (4 × 10243 bytes) of main memory (RAM).[1] The exact barrier varies by motherboard and I/O device configuration, particularly the size of video RAM; it may be in the range of 2.75 GB to 3.5 GB.[2] The barrier is not present with a 64-bit processor and 64-bit operating system, or with certain x86 hardware and an operating system such as Linux or certain versions of Windows Server and macOS that allow use of physical address extension (PAE) mode on x86 to access more than 4 GB of RAM.

Whatever the actual position of the "barrier", there is no code in operating system software nor any hardware architectural limit that directly imposes it. Rather, the "barrier" is the result of interactions between several aspects of both.

Physical address limits[edit]

It is sometimes claimed that 32-bit processors and operating systems are limited to 4 GB (232 bytes) of RAM,[3][4] as were the original 80386DX and other early IA-32 CPUs. However, the Pentium Pro introduced the Physical Address Extension (PAE) mechanism,[5] which allowed addressing up to 64 GB (236 bytes) of RAM; almost all subsequent 32-bit x86 processors also implement PAE. PAE is a modification of the protected mode address translation scheme. It allows virtual or linear addresses to be translated to 36-bit physical addresses, instead of the 32-bit addresses available without PAE.[6] The CPU pinouts likewise provide 36 bits of physical address lines to the motherboard. [7]

Many x86 operating systems, including any version of Linux with a PAE kernel and some versions of Windows Server and macOS, can use PAE to address up to 64 GB of RAM on an x86 system.[8][9][10]

Use of PAE to address RAM above the 4 GB point allows use of more than 3 GB.[clarification needed] There are, however, factors that limit this ability, and lead to the "3 GB barrier" under certain circumstances, even though the processor implements PAE. These are described in the following sections.

Chipset and other motherboard issues[edit]

Although, as noted above, most x86 processors from the Pentium Pro onward are able to generate physical addresses up to 64 GB, the rest of the motherboard must participate in allowing RAM above the 4 GB point to be addressed by the CPU. Chipsets and motherboards allowing more than 4 GB of RAM with x86 processors do exist, but in the past, most of those intended for other than the high-end server market could access only 4 GB of RAM.[11]

This, however, is not sufficient to explain the "3 GB barrier" that appears even when running some x86 versions of Microsoft Windows on platforms that can access more than 4 GB of RAM.

Memory-mapped I/O and disabled RAM[edit]

Modern personal computers are built around a set of standards that depend on, among other things, the characteristics of the original PCI bus. The original PCI bus implemented 32-bit physical addresses and 32-bit-wide data transfers. PCI (and PCI Express and AGP) devices present at least some, if not all, of their host control interfaces via a set of memory-mapped I/O locations (MMIO). The address space in which these MMIO locations appear is the same address space as that used by RAM, and while RAM can exist and be addressable above the 4 GB point, these MMIO locations decoded by I/O devices cannot be. They are limited by PCI bus specifications to addresses of 0xFFFFFFFF (232 − 1) and below. With 4 GB or more of RAM installed, and with RAM occupying a contiguous range of addresses starting at 0, some of the MMIO locations will overlap with RAM addresses. On machines with large amounts of video memory, MMIO locations have been found to occupy as much as 1.8 GB of the 32-bit address space.[12]

The BIOS and chipset are responsible for detecting these address conflicts and disabling access to the RAM at those locations.[13] Due to the way bus address ranges are determined on the PCI bus, this disabling is often at a relatively large granularity, resulting in relatively large amounts of RAM being disabled.[14]

Address remapping[edit]

x86 chipsets that can address more than 4 GB of RAM typically also allow memory remapping (referred to in some BIOS setup screens as "memory hole remapping"). In this scheme, the BIOS detects the memory address conflict and in effect relocates the interfering RAM so that it may be addressed by the processor at a new physical address that does not conflict with MMIO.[citation needed] On the Intel side, this feature once was limited to server chipsets; however, newer desktop chipsets like the Intel 955X and 965 and later have it as well.[citation needed] On the AMD side, the AMD K8 and later processors' built-in memory controller had it from the beginning.[citation needed]

As the new physical addresses are above the 4 GB point, addressing this RAM does require that the operating system be able to use physical addresses larger than 232.[15] This capability is provided by PAE. Note that there is not necessarily a requirement for the operating system to support more than 4 GB total of RAM, as the total RAM might be only 4 GB; it is just that a portion of it appears to the CPU at addresses in the range from 4 GB and up.[15]

This form of the 3 GB barrier affects one generation of MacBooks,[16] lasting 1 year (Core2Duo (Merom) – Nov 2006 to Oct 2007): the prior generation was limited to 2 GB, while later generations (Nov 2007 – Oct 2009) allowed 4 GB through the use of PAE and memory-hole remapping, and subsequent generations (late 2009 onwards) use 64-bit processors and therefore can address over 4 GB.

Windows version dependencies[edit]

In Microsoft's "non-server", or "client", x86 editions of Microsoft Windows (Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1, and Windows 10), are able to operate x86 processors in PAE mode, and do so by default as long as the CPU present implements the NX bit.[17] Nevertheless, these operating systems do not permit addressing of physical memory above the 4 GB address boundary. This is not an architectural limit; it is a limit imposed by Microsoft via license enforcement routines as a workaround for device driver compatibility issues that were (supposedly)[18] discovered during testing.[19]

Thus, the "3 GB barrier" under x86 Windows "client" operating systems can therefore arise in two slightly different scenarios. In both, RAM near the 4 GB point conflicts with memory-mapped I/O space. Either the BIOS simply disables the conflicting RAM; or, the BIOS remaps the conflicting RAM to physical addresses above the 4 GB point,[citation needed] but x86 Windows client editions refuse to use physical addresses higher than that, even though they are running with PAE enabled. The conflicting RAM is therefore unavailable to the operating system whether it is remapped or not.

See also[edit]

References[edit]

  1. ^ Microsoft Corporation. "Memory Limits for Windows Releases". Retrieved 7 August 2017. Devices have to map their memory below 4 GB for compatibility with non-PAE-aware Windows releases. Therefore, if the system has 4GB of RAM, some of it is either disabled or is remapped above 4GB by the BIOS. If the memory is remapped, X64 Windows can use this memory. X86 client versions of Windows don't support physical memory above the 4GB mark, so they can’t access these remapped regions.
  2. ^ Russinovich, Mark. "Pushing the Limits of Windows: Physical Memory". Technet. Microsoft. Retrieved 7 August 2017.
  3. ^ Matthew Murray (2009-10-27). "Windows 7: The 64-Bit Question". PCMag. Retrieved 7 August 2017. A 32-bit system is limited to utilizing 4GB of RAM (232 addresses)
  4. ^ Andy Patrizio (2002-07-22). "AMD Answers the 64-Bit Question". Wired. Archived from the original on December 16, 2008. Retrieved 7 August 2017. 32-bit processors like Intel's Pentium III/IV and AMD's Athlon have a memory limit of 4 GB per CPU. Any more memory can't be addressed.
  5. ^ Shanley, Tom (1998). Pentium Pro and Pentium II System Architecture. PC System Architecture Series (Second ed.). Addison-Wesley. p. 445. ISBN 0-201-30973-4.
  6. ^ "Volume 1: Specifications" (pdf). Pentium Pro Family Developer’s Manual. Intel Corporation. 1996. pp. 3–15. Retrieved 7 August 2017. The Pentium Pro processor physical address space is 236 bytes or 64-Gigabytes (64 Gbyte).
  7. ^ "Volume 1: Specifications" (pdf). Pentium Pro Family Developer’s Manual. Intel Corporation. 1996. p. 15-5. Retrieved 7 August 2017. Pin #: C1; Signal Name: A35#
  8. ^ Microsoft Corporation. "Memory Limits for Windows Releases". Retrieved 7 August 2017. Windows Server 2008 Enterprise; Limit in 32-bit Windows: 64 GB
  9. ^ "Enabling PAE". Ubuntu Documentation. 2010-05-19. Retrieved 2010-06-07. Physical Address Extension is a technology which allows 32 bit operating systems to use up to 64 GB of memory (RAM)... PAE is supported on the majority of computers today and it is an easy procedure to enable it in Ubuntu, if it is not already.
  10. ^ "Linux Kernel". Fedora Documentation. 2010-05-18. Retrieved 2010-06-07. Fedora 8 includes the following kernel builds: ... The kernel-PAE, for use in 32-bit x86 systems with more than 4GB of RAM, or with CPUs that have an NX (No eXecute) feature.
  11. ^ Intel Corporation (February 2005). "Intel Chipset 4 GB System Memory Support" (PDF). Pentium Pro Family Developer’s Manual. p. 7. Archived from the original (pdf) on 6 March 2007. Retrieved 7 August 2017. In uni-processor based systems for mobile, desktop, workstation, and entry level servers, chipsets may be limited to 4 GB of maximum memory. In today’s dual processor Intel server chipsets and workstations, maximum system memory size can be upwards of 16 GB.
  12. ^ Mark Russinovich (2008-07-21). "Pushing the Limits of Windows: Physical Memory". Archived from the original on 9 June 2010. Retrieved 7 August 2017. Windows XP SP2 also enabled Physical Address Extensions (PAE) support by default on hardware that implements no-execute memory because its required for Data Execution Prevention (DEP), but that also enables support for more than 4GB of memory.
  13. ^ Intel Corporation (February 2005). "Intel Chipset 4 GB System Memory Support" (PDF). Archived from the original (pdf) on 6 March 2007. Retrieved 7 August 2017. In platforms populated with physical memory sizes approaching 4 GB and greater, onboard system resource requirements will likely not allow the operating system to take advantage of all physical memory populated due to PCI specification requirements and other memory mapped IO resources. Portions of physical memory may overlap with the memory space dedicated to other subsystems and become unavailable to the operating system.
  14. ^ Intel Corporation (February 2005). "Intel Chipset 4 GB System Memory Support" (PDF). Pentium Pro Family Developer’s Manual. p. 8. Archived from the original (pdf) on 6 March 2007. Retrieved 7 August 2017.
  15. ^ a b Intel Corporation (February 2005). "Intel Chipset 4 GB System Memory Support" (PDF). Pentium Pro Family Developer’s Manual. p. 13,14. Archived from the original (pdf) on 6 March 2007. Retrieved 7 August 2017. In order to use remapping, the operating system must be able to address ranges higher than 4 GB of memory.
  16. ^ "Understanding Intel Mac RAM".
  17. ^ Mark Russinovich (2008-07-21). "Pushing the Limits of Windows: Physical Memory". Archived from the original on 9 June 2010. Retrieved 7 August 2017. Windows XP SP2 also enabled Physical Address Extensions (PAE) support by default on hardware that implements no-execute memory because its required for Data Execution Prevention (DEP), but that also enables support for more than 4GB of memory.
  18. ^ Chappell, Geoff. "Licensed Memory in 32-Bit Windows Vista". geoffchappell.com. WP:SPS. Retrieved 20 April 2014.
  19. ^ Mark Russinovich (2008-07-21). "Pushing the Limits of Windows: Physical Memory". Archived from the original on 9 June 2010. Retrieved 7 August 2017. The problematic client driver ecosystem led to the decision for client SKUs to ignore physical memory that resides above 4GB, even though they can theoretically address it. […] 4GB is the licensed limit for 32-bit client SKUs.

External links[edit]