Re: Why can OS kernel only use maximum 2GB memory?




Liang Yang wrote:
Hi,

For a 32 bit OS running on a 32bit IA processor, why is 2GB the maximum
memory used by OS kernel while application process can use more than 2GB
memory? Which factor decide this limitation?


To expand on th other posts, there is no such requirement or
limitation.

It is perfectly possible to create an OS where the kernel and
applications share essentially no address space, which would allow you
to dedicate 4GB to each simultaneously. Further, there's nothing in
the ISA really restricting either the kernel or applications from using
more than one address space, although that can be quite clumsy. Some
ISAs, zSeries for example, have considerable ISA support for doing
that.

OTOH, it's *very* convenient to be able to map a certain amount of the
kernel into a common portion of the address space, so most OS's do
that. Exactly where that split occurs is entirely OS dependant, but
the 2G/2G and 3G/1G splits are common on IA32. With a more traditional
(monolithic) kernel structure, the kernel will need to address some
quite large data structures, and the size of the kernel segment puts an
upper limit on the size of the supported system, since all those
structure (most conveniently) go in there. For example, consider that
each page of real and virtual memory will likely require at *least* a
dozen bytes of data structure to manage (consider a IA32 system with
PAE and 64GB of real - just managing all that real - and associated
virtual - memory will likely take .5-1GB of memory). On the flip side
you want the space for an application to be as big as possible. Some
of the microkernel OSs go much further in segregating the address
spaces needed by kernel functions and applications.

.



Relevant Pages