tags:

views:

59

answers:

1

When a thread is executing in kernel mode, will the stack pointer points to its kernel mode stack? Similarly, will it points to the user mode stack when the thread is running in user mode?

Thanks.

+1  A: 

It depends on what kind of process is executing. Recent linux kernels allow user processes in kernel mode There are also multiple stacks in each process and mode so your reference to "the stack pointer" is a little vague imho.

controlfreak123
There is only one stack pointer register, right? I think he's referring to that one.
Joren
yes. I think maybe the question should refer to the stack pointer register's value instead of just the stack pointer. Thats what i was getting at but i can't edit questions so i just mentioned it in my answer :)
controlfreak123
Yes, I was referring to the stack pointer register.Thanks.
Suresh