Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上下文切换 #46

Open
superDCF opened this issue Dec 25, 2020 · 0 comments
Open

上下文切换 #46

superDCF opened this issue Dec 25, 2020 · 0 comments

Comments

@superDCF
Copy link
Owner

发生CPU上下文切换的情况有:
1、进程上下文切换
用户态和内核态的执行栈、寄存器等信息都要保存

2、线程上下文切换
一般只需要保存该线程的私有的执行栈和一些寄存器信息保存

3、中断
不需要用户态的保存,只要内核态的执行信息保存。

发生CPU上下文切换,有当前执行信息的保存和要执行的进程的执行信息恢复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant