NAME

SYNOPSIS

DESCRIPTION

The pbind utility controls and queries bindings of processes to processors. pbind binds all the LWPs (lightweight processes) of a process to a processor, or removes or displays the bindings.

When an LWP is bound to a processor, it will be executed only by that processor except when the LWP requires a resource that is provided only by another processor. The binding is not exclusive, that is, the processor is free execute other LWPs
as well.

Bindings are inherited, so new LWPs and processes created by a bound LWP will have the same binding. Binding an interactive shell to a processor, for example, binds all commands executed by the shell.

This command may be used to bind or unbind any process for which the user has permission to signal — any process that has the same effective UID as the user. The proc_owner privilege is needed to bind or unbind any process
with an effective user ID different from that of the user.

OPTIONS

The following options are supported:

-b processor_id

Binds all the LWPs of the specified processes to the processor processor_id. Specify processor_id
as the processor ID of the processor to be controlled or queried. processor_id must be present and on-line. Use the psrinfo command to determine whether or not processor_id is present and online. See psrinfo(1M).

-q

Displays the bindings of the specified processes, or of all processes. If a process is composed of multiple LWPs, which have different bindings, the bindings of only one of the bound LWPs will be displayed.

-u

Removes the bindings of all LWPs of the specified processes, allowing them to be executed on any on-line processor.

OPERANDS

The following operands are supported:

pid

The process ID of the process to be controlled or queried.

EXAMPLES

Example 1 Binding processes

The following example binds processes 204 and 223 to processor 2.

example% pbind -b 2 204 223

This command displays the following output:

process id 204: was 2, now 2
process id 223: was 3, now 2

Example 2 Unbinding a process

The following example unbinds process 204.

example% pbind -u 204

Example 3 Querying Bindings

The following example demonstrates that process 1 is bound to processor 0, process 149 has at least one LWP bound
to CPU3, and process 101 has no bound LWPs.