[CentOS] Adding RAM
John R Pierce
pierce at hogranch.com
Sun Dec 7 20:20:43 UTC 2008
Morten Torstensen wrote:
> With PAE you can access up to 64GB memory. It works much the same way as
> XMS memory in DOS, where "high mem" is mapped to a low mem window. It is
> just addresses that are mapped, there is no physical copying of memory
> that you had with EMS memory.
thats not at all an accurate description (other than the 64GB part)
ALL virtual memory systems use page tables to map virtual addresses to
physical addresses. x86 systems (and many others) use a 2-level page
table where a the high bits of a virtual address is used to look up a
page table entry in the page directory, then this in turn is used with
middle address bits to look up an actual physical page address. in
32bit x86, this system allows addressing 4GB of physical memory for as
many 4GB virtual address spaces as you care to maintain tables for..
the page directory and each page table occupies a single 4K page of
memory, which holds 1024 entries of 32 bits each. a process that uses
a full 4GB of virtual would require the 1 4K page directory and 1024 4K
page tables (although in Linux systems the top 1GB of the 4GB address
space is the kernel space, which is shared by all processes). in
practice, most page directories and page tables are only partially
populated as most processes only use a small part of their address space.
PAE uses a modified page table where each page table instead has 512 x
64bit entries, which provide the larger physical address bits, and it
adds a 3rd level page directory so each page fault has to go through
three levels of page tables rather than two.
(side note, this is assuming 4K pages... x86 also supports 4M pages,
which reduce the lookups by one level, however, I don't think this is
for a pretty good summary of this.
More information about the CentOS