Hi all,
Just wondering how big you think I should have my kernel stack, I have it at 256KB now, what do you have?
thanks.
PMode Stacks
Re:PMode Stacks
1024 bytes is how big mine is. Though there really isn't a right or wrong size for a kernel stack. It just has to be big enough.
K.J.
K.J.
Re:PMode Stacks
I've currently reserved 4 KB for the kernel stack, but I'm not worrying about this, yet...
I can easily change this...
I can easily change this...
Re:PMode Stacks
Each thread has three pages for a kernel stack: two pages for data with a guard page at the top. There is also a guard page at the bottom, owned by the previous thread. The guard pages are unmapped pages which trap accesses outside the proper area of the stack -- basically, they act to catch stack overflows or underflows.
Re:PMode Stacks
i was using a single stack which is 1024 bytes (1k) in size for the kernel code ie when users call kernel code, and each process has its own stack 512 bytes. is this a bad idea?
Re:PMode Stacks
The kernel stack looks a bit too small, but see if it works. The user stack is much too small, but if you are using paging then you will be able to resize the stack dynamically (if you get a page fault, and the address is in the page at the end of the stack, then enlarge the stack and continue).