Page 1 of 1
Paging question
Posted: Sat Apr 02, 2005 2:24 am
by Guest
Hello, how is that possible that more programs can be in the memory in the same time ? You start a program and that has been loaded to 0x400000 after you start another program that will be loaded to 0x400000 and then ? I have heard that paging can fix that problem but how ?
Re:Paging question
Posted: Sat Apr 02, 2005 2:55 am
by AR
Physical and virtual memory are seperate things. Where something is in virtual memory doesn't say anything about where it is in physical memory. So to use your example, 0x40000 in the first app could be mapped at physical 0x5000, 0x40000 is the second app could be at 0x26000 physical, and so on. The address spaces are changed by simply loading a new page directory into CR3.
Other thing to remember: Not every virtual address needs a physical address, if a physical address isn't specified when that location is accessed, it will cause a page fault allowing the Kernel to load a page in only when necessary.
Re:Paging question
Posted: Sat Apr 02, 2005 2:58 am
by Pype.Clicker