kernel stack for linux process

后端 未结 4 990
自闭症患者
自闭症患者 2021-01-31 18:35

Is the kernel stack for all process shared or there is a seperate kernel stack for each process? If it is seperate for each process where is this stack pointer stored? In task_s

4条回答
  •  无人共我
    2021-01-31 19:31

    This old article says that each process has its own kernel stack. See comments to why that seems to be a very good design.

    I tried reading the current source to make sure, but since the kernel stack is "implicit", it's not visible in the task_struct. This is mentioned in the article.

    This answer was edited to incorporate wisdom from comments. Thanks.

提交回复
热议问题