Reputation: 12272
I am reading this book, and in the chapter "The structure of process", while talking about the context of a process, it divides the context iun 2 portions. The static and the dynamic portion. It says that every process has a user stack and a kernel stack, and the kernel stack is placed on the dynamic portion of the context.
The dynamic part of the system-level context of a process consists of a set layers, visualized as a last-in-first-out stack.
and while defining a figure,
The right side of the figure shows the dynamic portion of the context. It consists of several stack frames, where each frame contains the saved register context of the previous layer, and the kernel stack as the kernel executes in that layer.
So, while the user space stack is placed in the static portion of the context, is there any particular reason for the kernel stack to be placed in the dynamic portion?
Upvotes: 3
Views: 124
Reputation: 4387
For me each process has it's static, and dynamic context. For kernel context reference to last dynamic part must be stored in it's static context. That way system can get access to dynamic part. Please look here.
That dynamic context is needed since kernel, and user lands are separated. It can be required to call kernel land, and get back to user land, back and forth. To track that system uses that dynamic part of process context.
Upvotes: 1