Please help me clear up paging...
Posted: Fri May 11, 2007 12:27 pm
I've read about paging for days and days, and I am still stuck with a couple of questions.
Would this make for a good Physical and Virtual Allocator w/ paging?
My kernel has a PD with everything marked Phys->Virt (1:1).
When I load a new application (or thread not part of the kernel), I create a new PD bringing in the kernel to like 0mb virtual (protected), and app to be loaded at 1mb then the app will be give its size + 4k in allocated pages. The rest of the pages in the PD would be Not-Present. When the app requests more, the kernel allocs pages (if neccessary) and maps the pages into the apps virtual space for malloc to chop up.
Does that seem anywhere near right?
Thanks,
Rich
Would this make for a good Physical and Virtual Allocator w/ paging?
My kernel has a PD with everything marked Phys->Virt (1:1).
When I load a new application (or thread not part of the kernel), I create a new PD bringing in the kernel to like 0mb virtual (protected), and app to be loaded at 1mb then the app will be give its size + 4k in allocated pages. The rest of the pages in the PD would be Not-Present. When the app requests more, the kernel allocs pages (if neccessary) and maps the pages into the apps virtual space for malloc to chop up.
Does that seem anywhere near right?
Thanks,
Rich