On Fri, Feb 14, 2014 at 09:49:12AM -0600, Jules Richardson wrote:
On 02/13/2014 06:19 AM, Peter Corlett wrote:
> Back to the toy operating systems, and they're deliberately hobbled to 32
> bit physical addresses too. If you want more than 3GB of RAM in Windows, you
> have to upgrade to 64 bits.
I suppose theoretically you could bank-switch in as
much as you wanted in
64KB chunks, into one specific spot of the memory map, and the software to
access it - at least from user-land - probably wouldn't be too complex. An
acre of two of 6264 SRAMs and decoding logic, and a power supply the size of
a house to run it... (at least you'd stay warm)
This already occurs. Paging *is* bank-switching, and all modern operating
systems (including Windows) depend on it.
Consider for example running multiple real-mode DOS programs simultaneously
under Windows. All of those want to use 20 bit addresses, i.e. the first 1MB of
RAM. So Windows uses the paging hardware to give each program a different chunk
of memory to play with.
Much though I like to put the boot into Windows, the 3GB RAM limitation on 32
bit Windows is a sound design decision, and mainly relates to some DMA hardware
and drivers not understanding memory beyond the 4GB boundary. You can frig it
to remve the limitation, but that is at the risk of reduced performance and
stability. It is much better to just switch to 64 bits if you need more RAM.
To get back on topic for this list :) the segment-limit approach used in older
architectures such as the PDP-11 serve much the same purpose and can also be
considered a kind of bank-switching. Paging is just a lot more flexible and
segmentation is now obsolete.