Re: Kernel Stack and User Stack

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

 



 
each process has an associated task_struct, which is used for process managament. to allocate this struct, the kernel allocates 2 pages (normally, but as mentioned, it can be only 1 page), which amounts to 8k, and places the task_struct at the bottom.
each time the host goes from user space to kernel space (interrupt, system call , etc...), these 2 pages are used for the kernel stack.
so, your module does not have a stack of it's own, but rather uses whats available at the time of it's execution - either the 2 pages as i mentioned, or the stack of a kernel thread which called it.

Source : http://kerneltrap.org/node/5416

On 5/18/06, abum@xxxxxxxxx <abum@xxxxxxxxx> wrote:
Yes. There is also a per process kernel stack maintained by ernel.

~Abu

> HI,
> I am a newbie to linux kernel. I wanted to know that for every process
> created in User Space
> there is a separate stack created .Wat about the kernel stack , is it
> separate for every process
>
> Thanks in advance,
> Zaheer
>



**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Aftek Infosys Limited
is 'privileged' and 'confidential' and intended for use only by the individual
or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.
***************************************************************************
http://www.aftek.com/


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[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