Chinaunix首页 | 论坛 | 博客
  • 博客访问: 315898
  • 博文数量: 72
  • 博客积分: 2580
  • 博客等级: 少校
  • 技术积分: 675
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-07 17:36
文章分类

全部博文(72)

文章存档

2012年(7)

2011年(17)

2010年(46)

2009年(2)

分类: LINUX

2010-06-30 16:35:12

The following mechanisms are available in the kernel to defer work to a bottom half: softirqs, tasklets, and work queues .
Softirqs are the basic bottom half mechanism and have strong locking requirements. They are used only by a
few performance-sensitive subsystems such as the networking layer, SCSI layer, and kernel timers.
Tasklets are built on top of softirqs and are easier to use. It's recommended to use tasklets unless you have crucial
scalability or speed requirements.
A primary difference between a softirq and a tasklet is that the former is reentrant whereas the latter isn't. Different instances of a softirq can run simultaneously on different processors, but that is not the case with tasklets.
Work queues are a third way to defer work from interrupt handlers. They execute in process context and are
allowed to sleep , so they can use drowsy functions such as mutexes.
阅读(905) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~