Binds or unbinds the kernel threads of a process to a processor.
bindprocessor Process [ ProcessorNum ] | -q | -u Process
The bindprocessor command binds or unbinds the kernel threads of a process, or lists available processors. The Process parameter is the process identifier of the process whose threads are to be bound or unbound, and the ProcessorNum parameter is the logicial processor number of the processor to be used. If the ProcessorNum parameter is omitted, the process is bound to a randomly selected processor.
It is important to understand that a process itself is not bound, but rather its kernel threads are bound. Once kernel threads are bound, they are always scheduled to run on the chosen processor, unless they are later unbound. When a new thread is created, it has the same bind properties as its creator. This applies to the initial thread in the new process created by the fork subroutine: the new thread inherits the bind properties of the thread which called fork. When the exec subroutine is called, thread properties are left unchanged.
The -q flag of the bindprocessor command lists the available logical processor numbers: you can use the logical numbers given as values for the ProcessorNum parameter. The -u flag unbinds the threads of a process, allowing them to run on any processor.
Notes:
-q | Displays the processors which are available. |
-u | Unbinds the threads of the specified process. |
bindprocessor -qFor a four processor system, the output is similar to:
The available processors are: 0 1 2 3
bindprocessor 19254 1
/usr/sbin/bindprocessor | Contains the bindprocessor command. |
The cpu_state command, smit command.
The bindprocessor subroutine. exec subroutine, fork subroutine.
Controlling Processor Use in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.