3 GB barrier
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, the 3 GB barrier is a limitation of some 32-bit operating systems running on x86 microprocessor
Microprocessor
A microprocessor incorporates the functions of a computer's central processing unit on a single integrated circuit, or at most a few integrated circuits. It is a multipurpose, programmable device that accepts digital data as input, processes it according to instructions stored in its memory, and...

s. It prevents the operating systems from using more than about 3 GB of main memory (RAM). The exact barrier varies by motherboard and I/O device configuration, particularly the size of video RAM; it may be in the 2.9–3.5 GB range.

The barrier can be resolved by moving to a 64-bit processor and operating system. On certain x86 hardware, it is possible to resolve it by using an operating system such as Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 or certain versions of Windows Server
Windows Server
Windows Server is a brand name for a group of server operating systems released by Microsoft Corporation. All are part of Microsoft Servers.- Members :This brand includes the following software:* Windows 2000 Server* Windows Server 2003...

 that fully support physical address extension
Physical Address Extension
In computing, Physical Address Extension is a feature to allow x86 processors to access a physical address space larger than 4 gigabytes....

 (PAE) mode on x86.

The barrier is caused by a set of interactions between several components, including the operating system.

Physical address limits

It is commonly claimed that 32-bit processors and operating systems
are limited to 4 GB of RAM, and that this is a primary cause of the "3 GB barrier".
This is not a true limit of these processors.
Almost all modern x86 processors (from the 1995 Pentium Pro
Pentium Pro
The Pentium Pro is a sixth-generation x86 microprocessor developed and manufactured by Intel introduced in November 1, 1995 . It introduced the P6 microarchitecture and was originally intended to replace the original Pentium in a full range of applications...

 onward) can in fact already address up to 64 GB RAM via physical address extension
Physical Address Extension
In computing, Physical Address Extension is a feature to allow x86 processors to access a physical address space larger than 4 gigabytes....

 (PAE). PAE is a modification of the protected mode
Protected mode
In computing, protected mode, also called protected virtual address mode, is an operational mode of x86-compatible central processing units...

 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. The CPU pinouts likewise provide 36 bits of physical address to the motherboard
Motherboard
In personal computers, a motherboard is the central printed circuit board in many modern computers and holds many of the crucial components of the system, providing connectors for other peripherals. The motherboard is sometimes alternatively known as the mainboard, system board, or, on Apple...

.
Many x86 operating systems, including any version of Linux with a PAE kernel and some versions of Windows Server
Windows Server
Windows Server is a brand name for a group of server operating systems released by Microsoft Corporation. All are part of Microsoft Servers.- Members :This brand includes the following software:* Windows 2000 Server* Windows Server 2003...

, support the use of PAE to address up to 64 GB of RAM on an x86 system.

Use of PAE to address RAM above the 4 GB point is key to breaking the "3 GB barrier". There are, however, factors that limit this ability, and lead to the "3 GB barrier" under certain circumstances, even though the processor fully supports PAE.

Chipset and other motherboard issues

Although, as noted above, most x86 processors from the Pentium Pro onward do support physical addresses up to 64 GB, the rest of the motherboard
Motherboard
In personal computers, a motherboard is the central printed circuit board in many modern computers and holds many of the crucial components of the system, providing connectors for other peripherals. The motherboard is sometimes alternatively known as the mainboard, system board, or, on Apple...

 must participate in allowing RAM above the 4GB 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 supported only 4 GB of RAM. name="Intel-chipset-4GB-7a">

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 do support more than 4 GB of RAM.

Memory mapped I/O and disabled RAM

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 supported 32-bit physical addresses and 32-bit wide data transfers.
PCI (and PCI Express
PCI Express
PCI Express , officially abbreviated as PCIe, is a computer expansion card standard designed to replace the older PCI, PCI-X, and AGP bus standards...

, and AGP) devices present at least some, if not all, of their host control interfaces via a set of memory-mapped I/O
Memory-mapped I/O
Memory-mapped I/O and port I/O are two complementary methods of performing input/output between the CPU and peripheral devices in a computer...

 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.

The BIOS and chipset are responsible for detecting these address conflicts and disabling access to the RAM at those locations. 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.

Address remapping (the "memory hole")

x86 chipsets that support more than 4 GB of RAM typically also support 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. On the Intel side, this support once was limited to server chipsets; however, newer desktop chipsets like the Intel 955X and 965 and later support it as well. On the AMD side, the AMD K8 and later processors' built-in memory controller supported it from the beginning.

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. 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.

This form of the 3 GB barrier affects one generation of MacBook
MacBook
The MacBook was a brand of Macintosh notebook computers built by Apple Inc. First introduced in May 2006, it replaced the iBook and 12-inch PowerBook series of notebooks as a part of the Apple–Intel transition. Positioned as the low end of the MacBook family, the Apple MacBook was aimed at the...

s, 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 by supporting PAE and memory hole remapping, and subsequent generations (late 2009 onwards) use 64-bit processors and support over 4 GB.

Windows version dependencies

The final piece of the 3 GB barrier puzzle is a limit deliberately coded by Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 into the "non-server", or "client", x86 editions of Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

: Windows XP
Windows XP
Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

, Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

, and Windows 7.
The 32-bit (x86) versions of these are able to operate x86 processors in PAE mode, and do so by default as long as the CPU present supports the NX bit
NX bit
The NX bit, which stands for No eXecute, is a technology used in CPUs to segregate areas of memory for use by either storage of processor instructions or for storage of data, a feature normally only found in Harvard architecture processors...

. 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 as a workaround for driver compatibility issues that were discovered during testing.

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, 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

  • 640 KB barrier
  • Time formatting and storage bugs
    Time formatting and storage bugs
    In computer science, time formatting and storage bugs are a class of software bugs which may cause time and date calculation or display to be improperly handled. These are most commonly manifestations of arithmetic overflow, but can also be the result of other issues...

  • x86-64
    X86-64
    x86-64 is an extension of the x86 instruction set. It supports vastly larger virtual and physical address spaces than are possible on x86, thereby allowing programmers to conveniently work with much larger data sets. x86-64 also provides 64-bit general purpose registers and numerous other...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK