期刊文献+

Linux内核新旧工作队列机制的剖析和比较

Analysis and Comparison of the New and Old Work Queue in Linux Kernel
下载PDF
导出
摘要 在中断驱动的程序设计中,工作队列是一种强有力的工具。但是在Linux2.6.35及其以前的内核版本中,每创建一个工作队列就创建与CPU数目相同的内核线程,耗费大量的内核资源;工作只能严格串行的处理,效率低。为了适应大规模多处理器硬件平台,提高处理效率,Linux2.6.36内核开发了受控并发工作队列机制。这种新机制由内核根据需要创建或销毁线程,工作可以并发的处理,可望替代之前长期使用的专用线程工具。文章详细介绍和剖析新工作队列机制,并通过实验,对比新旧工作队列机制的资源消耗和工作效率。结果表明,新工作队列机制大大减少内核资源的耗费,提高了处理效率。 Work Queue is a powerful tool in interrupt-driven programming. But in Linux kernels of 2.6.35 and before, it consumes a lot of kernel resources in that whenever a Work Queue is created, the same number of kernel threads as CPUs are created. The efficiency to processing works in Work Queue is low due to strictly sequential processing. In order to adapt the hardware platforms with large-scale multiprocessors and increase the processing efficiency, the Linux kernel of 2.6.36 developed Concurrency Managed Workqueue. With this new mechanism, the kernel creates and destroys the threads according to the processing requirements, and works can be concurrently processed. The new Work Queue is hoped to replace the private thread tools that had been used long time. The paper introduces and analyses this new mechanism in detail, and compares the resource consumes and processing efficiency between the new and old mechanisms by experiments. The results show that the new mechanism of Work Queue greatly reduces consumes of kernel resources and increases the processing efficiency.
作者 马俊强
出处 《电脑知识与技术》 2014年第2X期1227-1230,共4页 Computer Knowledge and Technology
关键词 LINUX内核 中断驱动 工作队列 受控并发工作队列 Linux kernel interrupt-driven work queue concurrency managed workqueue
  • 相关文献

参考文献4

  • 1Tejun Heo.backing-dev:replace private thread pool with workqueue.txt. http://lwn.net/Articles/403653 . 2010
  • 2Tejun Heo.workqueue.txt. http://lxr.linux.no/linux+v-2.6.36.4/Documentation/workqueue.txt . 2010
  • 3Jonathan Corbet.Concurrency-managed workqueues. http://lwn.net/Articles/355700 . 2010
  • 4Jonathan Corbet.Working on workqueues. http://lwn.net/Articles/403891 . 2010

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部