0

Linux lightweight processes share the same memory descriptor as referred here. This includes all the segments including text, data, heap, stack. I wanted to how this shared stack segment is managed for more than one execution context by the kernel. Or does the kernel maintain separate stack for each light weight process? If so, then how is that virtual memory area referenced by the running process.

Thanks in advance.

Community
  • 1
  • 1
jada12276
  • 129
  • 8
  • 1
    Generally each thread has a statically sized stack allocated to it. The best quick reference I could find was this [answer](http://stackoverflow.com/a/6275244/3288910). – Jason Nov 18 '15 at 16:46
  • @Jason Thanks for the answer link. It clarifies that threads share the stack segment and accesses within an execution context is done using the [stack](http://lxr.free-electrons.com/source/include/linux/sched.h?v=3.4#L1266) pointer. – jada12276 Nov 18 '15 at 17:53

0 Answers0