CPU Affinity

From RTwiki
(Difference between revisions)
Jump to: navigation, search
m (Protected "CPU Affinity": This page has been migrated to the Linux Foundation RT wiki. (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite)))
(Remove Content)
 
Line 1: Line 1:
  
The ability in Linux to bind one or more processes to one or more processors, called CPU affinity, is a long-requested feature. The idea is to say “always run this process on processor one” or “run these processes on all processors but processor zero”. The scheduler then obeys the order, and the process runs only on the allowed processors.
+
<div style="margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#f9e9e9; align:right;">
 
+
<b>This wiki is being migrated to the Linux Foundation Real-Time Linux Project hosted wiki. The new page is available at: https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/cpu-partitioning/start#affinity. This page is now deprecated.</b>
Other operating systems, such as Windows NT, have long provided a system call to set the CPU affinity for a process. Consequently, demand for such a system call in Linux has been high. Finally, the 2.5 kernel introduced a set of system calls for setting and retrieving the CPU affinity of a process.
+
</div>
 
+
In this article, I look at the reasons for introducing a CPU affinity interface to Linux. I then cover how to use the interface in your programs. If you are not a programmer or if you have an existing program you are unable to modify, I cover a simple utility for changing the affinity of a given process using its PID. Finally, we look at the actual implementation of the system call.
+
 
+
* http://www.linuxjournal.com/article/6799
+
 
+
* http://www.gnu.org/s/libc/manual/html_node/CPU-Affinity.html
+

Latest revision as of 09:50, 21 December 2017

This wiki is being migrated to the Linux Foundation Real-Time Linux Project hosted wiki. The new page is available at: https://wiki.linuxfoundation.org/realtime/documentation/howto/tools/cpu-partitioning/start#affinity. This page is now deprecated.

Personal tools