Kernel Design Questions re Paging
Posted: Wed Aug 24, 2005 11:19 pm
Hi,
I've decided that the low layer of my kernel will need a complete redesign, and I have a few questions about implementation details.
The proposed system will have a single [kernel] address space, which both apps and kernel will run in. I was thinking of using 4MB superpages, but then I also want resizable stacks, and I think this might not work so well.
The idea is to use something like guard-pages at the end of the stack, and when the stack page-faults, I can allocate a larger stack, and resume execution. Would 4MB pages be ineffective for this sort of approach? Also, would this imply that the stack has to be multiples of the page size?
Additionally, even with paging, does the stack access virtual addresses or physical addresses? IE: is it possible that the physical addresses for the stack be non-contiguous?
I think that's everything covered... ;-)
I've decided that the low layer of my kernel will need a complete redesign, and I have a few questions about implementation details.
The proposed system will have a single [kernel] address space, which both apps and kernel will run in. I was thinking of using 4MB superpages, but then I also want resizable stacks, and I think this might not work so well.
The idea is to use something like guard-pages at the end of the stack, and when the stack page-faults, I can allocate a larger stack, and resume execution. Would 4MB pages be ineffective for this sort of approach? Also, would this imply that the stack has to be multiples of the page size?
Additionally, even with paging, does the stack access virtual addresses or physical addresses? IE: is it possible that the physical addresses for the stack be non-contiguous?
I think that's everything covered... ;-)