You are confusing different things. Basically, the stack is an area in memory and some hardware support (the register to hold the top of the stack is esp and the register to hold the current base ebp of the stack frame, as well as the push, pop, call, ret commands. I mean x86) . When you installed this esp and the allocated memory for the stack - everything is ready, you can use it. Therefore, to use the stack you do not need to use the "process". The process is a concept of a different order. In other words, nothing contains a kernel to allocate a stack for itself ...
source
share