Created
October 20, 2013 05:27
-
-
Save caigen/7065355 to your computer and use it in GitHub Desktop.
内核问题
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1, 进程上下文和中断上下文在Linux内核中的区别 | |
| process context: 运行中的程序从用户空间进入内核空间,此时内核处于进程上下文并为进程做事。 | |
| interrupt context: 硬件中断后,内核执行中断处理程序(上半部)的执行(与后续的下半部),此时内核处于中断上下文。与特定进程无关。 | |
| 两者细节:暂略。 | |
| 2, 用户空间和内核空间通信为什么要使用copy_from_user和copy_to_user | |
| copy_from_user: 为了确保进入内核空间的数据正确完整安全的。 | |
| copy_to_user: 为将内核空间数据拉到用户空间以便用户空间执行的程序访问。 | |
| 3, 自旋锁、信号量、互斥锁在Linux内核中的区别 | |
| 自选锁:自旋等待锁可用, | |
| 信号量与互斥锁:睡眠等待锁唤醒用锁。 | |
| 三者细节:暂略。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment