Chinaunix首页 | 论坛 | 博客
  • 博客访问: 919109
  • 博文数量: 96
  • 博客积分: 10071
  • 博客等级: 上将
  • 技术积分: 1118
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-20 17:54
文章分类

全部博文(96)

文章存档

2011年(3)

2010年(3)

2009年(29)

2008年(54)

2007年(7)

分类: 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



阅读(2549) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~