Kernel Mode Stack
Posted: Wed Mar 18, 2009 11:10 am
First Question:
Does the kernel mode stack of each process need to be always present in the physical memory (i.e. they can't be swapped out)?
------------------------------------------------------------------------------------------------------------------------------------------------------------
Another question is about how Linux (2.6+) orgainises the memory mapping for kernel mode stacks:
For example, when a new process, say A , is created, the kernel must allocate a certain amount of memory in its address space for the kernel mode stack plus thread_info struct.
and the linear address of this memory must be mapped into a region of physical memory by paging mechanism. Let's say this linear address is 0x015FA000 and it is mapped to the physical memory
0x04502000.
Now is my second question:
If B and C are processes that have existed even before process A was created, will B and C's page tables include the entry ( 0x015FA000,0x04502000) into their page tables also?
If this is the case, does that mean every time a new process is created, this mapping must be included in the page table of every process?
Last Question:
is the linear address for a kernel mode stack in the last Gigabyte of the process address space (0xC0000000) or they could reside any where below ( with the U/S bits in the corresponding page entries set) ?
Does the kernel mode stack of each process need to be always present in the physical memory (i.e. they can't be swapped out)?
------------------------------------------------------------------------------------------------------------------------------------------------------------
Another question is about how Linux (2.6+) orgainises the memory mapping for kernel mode stacks:
For example, when a new process, say A , is created, the kernel must allocate a certain amount of memory in its address space for the kernel mode stack plus thread_info struct.
and the linear address of this memory must be mapped into a region of physical memory by paging mechanism. Let's say this linear address is 0x015FA000 and it is mapped to the physical memory
0x04502000.
Now is my second question:
If B and C are processes that have existed even before process A was created, will B and C's page tables include the entry ( 0x015FA000,0x04502000) into their page tables also?
If this is the case, does that mean every time a new process is created, this mapping must be included in the page table of every process?
Last Question:
is the linear address for a kernel mode stack in the last Gigabyte of the process address space (0xC0000000) or they could reside any where below ( with the U/S bits in the corresponding page entries set) ?