What is the difference between kernel stack and user stack?

前端 未结 7 523
忘了有多久
忘了有多久 2021-01-31 06:25

What is the need of using two different stacks in same program? How does trap change the current stack of program from user stack to kernel stack? How does it come back to user

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-31 06:49

    It's operating system dependent. The reason to have it is basic security of the operating system. It's by careful design of the operating system itself. For instance some processors have Kernel, Executive, Supervisor and User stacks.

    Renee

提交回复
热议问题