LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Process Creation : User mode stack (https://www.linuxquestions.org/questions/linux-newbie-8/linux-process-creation-user-mode-stack-842259/)

bibekbasu 11-04-2010 02:03 AM

Linux Process Creation : User mode stack
 
Hi,

I am new to Linux, Understood that from user mode, if a process call the system call fork(), then the process stars executing in system mode and a new child process is created with a new kernel mode space ( it include stack also) is allocated to that newly created child process.
My question is,
1>how and when is the user mode stack created for this newly created process?
2>How kernel know where is the user mode stack for this newly created process?
3>Can kernel access the user mode stack while executing in kernel mode in that newly created process context?

correct me if my question or understanding is wrong.

Thanks in advance for the guidance.

regards
Bibek

stress_junkie 11-04-2010 07:26 PM

A quick search on Google would list a mountain of information about this. Here are two examples.

http://www.linuxjournal.com/article/3814

http://www.informit.com/articles/article.aspx?p=370047

bibekbasu 11-07-2010 10:05 PM

Hi stress_junkie,

I have gone through both the links. Still I am not satisfied whether I have got the answer or not.

Both the link tells that whenever a process is forked, generally 8Kb of kernel stack is allocated. It says nothing about user mode stack. Dos this implies, that the 8Kb stack is the only stack for any process in both the modes, ( kernel or user mode)?


I found a similar question to mine in the following link
http://linux.derkeiler.com/Mailing-L.../msg11745.html

regards
Bibek


All times are GMT -5. The time now is 09:34 AM.