Re: Kernel stack question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks that answered my question

On 9/4/06, Rajat Jain <rajat.noida.india@xxxxxxxxx> wrote:
On 9/4/06, pandari kashyap <pandari.kashyap@xxxxxxxxx > wrote:
> Hello Newbies,
>
> I wanted to know whether Kernel maintains a kernel mode stack for each user
> process? or does it maintain one kernel mode stack for all user processes?.
> Where exactly in memory is this stack space allocated?.

The stack space is allocated in the kernel virtual memory address
space (3GB - 4GB). There is one kernel mode stack per user process.
There is also one kernel mode stack per kernel process (i.e. the
processes that are not attached to any user process - created using
kernel_thread()).

I'm not sure about the interrupt mode stack though, but I guess there
is ONE interrupt mode stack per CPU (And all drivers share it?).

>
> How does kernel get the address of the process descriptor from the stack
> pointer?

Look for the "current" macro in current.h.

Thanks,

Rajat


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux