x86 protected mode: Access memory beyond RAM available?

Aug 31, 2012 at 11:12am
Say you have 5MB memory installed and you access memory location 5MB+1 (linear, read or write doesn't matter). How does the 80386+ respond to this? Does it wrap arround memory? Does it fire the invalid segment descriptor interrupt? Or does it just ignore it and give 0 for that/those memory location(s)?
Aug 31, 2012 at 2:19pm
From what I have learned is that accessing that memory is uncharted territory, ie it depends largely on the system, but the best way to find out is to write data there and see if it is readable. (obviously testing in a VM would be safer, but might not give the best accuracy)
Aug 31, 2012 at 2:22pm
Are you sure you don't mean unreal mode? Protected mode lets you use the entire 32-bit address space as virtual memory and map some subset (or all) of that to physical memory. If a particular address is accessed when it's not mapped, it will throw an interrupt. Most OSs use that to do a page-in from swap space or to throw an error (segmentation fault).
Aug 31, 2012 at 2:41pm
It generates a page fault. An OS provides code that swaps physical memory pages with secondary memory pages to simulate contiguous physical memory to the process.
Aug 31, 2012 at 2:45pm
helios wrote:
Protected mode lets you use the entire 32-bit address space as virtual memory
superfury wrote:
you have 5MB memory installed

they said you only have 5Mb installed
Last edited on Aug 31, 2012 at 2:45pm
Topic archived. No new replies allowed.