Kernel space Stack for dual mode operation
separate space for security, efficiency
- Process registers snapshot are stored in kernel stack when Mode Switching occurs to restore after kernel mode.
- Also used for Process switching in Process switching steps
A single 8KB kernel memory area is allocated for a process
8KB, 2-pages are so small → kernel code has
- less recursion
- less local variable
thread_info is 52bytes so 8140 is usable and enough for kernel control paths
Upon entering kernel mode (Mode Switching)
- Task’s registers are saved on kernel stack Program context
During execution of kernel functions
- Function parameters and return address
- Storage locations for local(automatic) variables