Linux "processor affinity" explained
来源:互联网 发布:浙江大学网络教育专业 编辑:程序博客网 时间:2024/05/15 13:50
IBM's DeveloperWorks has published an article describing how the Linux 2.6 kernel supports "processor affinity" -- that is, ensuring that a particular process runs on a particular processor or set of processors within a multi-processor machine. Processor affinity can improve real-time performance, as well as cache hit-rates in complex calculations.
In determining where to run a process, the Linux 2.6 scheduler takes a look at the cpus_allowed
bitmask within each process's task_struct
data structure. This bitmask can be read or manipulated using the sched_get_affinity()
or sched_set_affinity()
functions, respectively.
Most often, processor affinity manipulations are done to improve real-time performance in multiprocessor systems, by essentially assigning long-running, time-critical processes to their own dedicated processor.
For example, systems integrator Concurrent uses technology resembling processor affinity -- which it calls CPU Shielding -- in its RedHawk Linux implementation. Real-time Linux vendor FSMLabs offers an add-on to its real-time Linux product called CPU Reservations that also resembles processor affinity. And, fabless networking chip house Cavium Networks says some of its customers use processor affinity to ensure adequate data-plane performance when running both data- and control layer applications on the same multi-core chips.
Besides its utility in real-time applications, processor affinity may yield performance improvements in cases where complex calculations require large numbers of inter-related processes, since distributing these across multiple CPUs could result in undesirable cache clobbering.
The DeveloperWorks article includes a simple sample application demonstrating processor affinity. The article can be found here.
- Linux "processor affinity" explained
- 什么是Processor affinity
- linux cpu affinity demo
- Linux CPU affinity
- Linux CPU affinity
- Linux CPU affinity
- linux irq/affinity理解
- Linux Networking Clearly Explained
- Linux load average explained
- linux network stack explained
- ARM Linux Processor Information
- linux 内核 中断亲和力-affinity
- Linux CPU亲和性 (affinity)
- Linux中CPU亲和性(affinity)
- Linux's boot process explained
- Linux Kernel Linked List Explained
- linux bridge and vlan explained
- Linux Top Command Output Explained
- sqlserver的保留关键字
- 不大会,测试一下
- 转delphi问题集锦
- 2006年IT技术盘点
- 网吧里的一夜
- Linux "processor affinity" explained
- 漫谈WinCE的手写识别技术(一)
- 在C#中实现CRC32算法。
- boost之option_description
- 七秘诀工作效率与薪水翻番
- 离开这里的这段时间,有太多太多的东西值得写了
- Modern c++ design 第十章
- 章五 带上眼罩测试软件(2)
- 2007-01-24 日志