[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 1

bindprocessor Command


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.

  1. The bindprocessor command is meant for multiprocessor systems. Although it will also work on uniprocessor systems, binding has no effect on such systems.
  2. You need root authority to bind or unbind threads in processes you do not own.


-q Displays the processors which are available.
-u Unbinds the threads of the specified process.


  1. To see which processors are available (possible ProcessorNum values), enter:

    bindprocessor -q

    For a four processor system, the output is similar to:

    The available processors are: 0 1 2 3
  2. To bind the threads in process 19254 to processor 1, enter:

    bindprocessor 19254 1


/usr/sbin/bindprocessor Contains the bindprocessor command.

Related Information

The cpu_state command, smit command.

The bindprocessor subroutine. exec subroutine, fork subroutine.

Controlling Processor Use in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]