分类: LINUX
2008-06-12 16:03:19
The main difference between process context and interrupt context
creator
http://creatorwu.cublog.cn/
在看《深入理解Linux内核》的时候,它对work queue介绍如下:
The main difference is that deferrable functions run in interrupt context while functions in work queues run in process context. Running in process context is the only way to execute functions that can block (for instance, functions that need to access some block of data on disk) because, as already observed in the section "Nested Execution of Exception and Interrupt Handlers" earlier in this chapter, no process switch can take place in interrupt context. Neither deferrable functions nor functions in a work queue can access the User Mode address space of a process. In fact, a deferrable function cannot make any assumption about the process that is currently running when it is executed. On the other hand, a function in a work queue is executed by a kernel thread, so there is no User Mode address space to access.
于是我就不是很明白:The main difference between process context and interrupt context
找到了以下两个介绍:
1. The main difference between process context and interrupt context is that process context can block, while interrupt context can’t.
2.Interrupt context mean that there will not be scheduling taking place until and unless that task ends while in the process context every task gets the CPU time