DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Process management

Managing processors and processes

The following sections discuss how to manage a system's processors and processes.

Processor administration information

Processors are identified with a processor ID number that gives them a unique tag within the system. The state of the processors in your system can be examined by using the psrinfo(1M) command or the processor_info(2) system call. They report whether the processor is online or offline.

Taking processors online and offline

When a processor is online, it can dispatch processes and perform normal operating system functions. You can bring a processor online with the psradm(1M) command or the p_online(2) system call. Taking a processor offline removes the processor from operational status. The processor retains its place in the system but does not perform any useful operations while it is idle.

Only processors with no bound processes can be taken offline. Some hardware platforms may require some processors to be online at all times. A processor can be taken offline with the psradm(1M) command or the p_online(2) system call. Once a processor has been taken offline, it remains idle until it is brought back online using the psradm(1M) command or the p_online(2) system call.

Binding processes to processors

By default, an LWP can execute on any processor in the system. You can use the pbind(1M) command or the processor_bind(2) system call to bind a process (all of the associated LWPs) or LWP to a processor. This restricts the LWPs to execute only on the specified processor. Once bound, all child processes created by this process or timeout routines requested by this process are bound by default to the same processor. The -P option of the ps(1) command can be used to display the processor binding status of all processes in the system. The pbind(1M) command can also be used to unbind a process (all the associated LWPs) or LWP from a processor. Once unbound, the process or LWP can execute on any processor in the system.

Placing processors in an exclusive binding mode

You can use the pexbind(1M) command or the processor_exbind(2) system call to place a processor in an exclusive binding mode, or to unbind it. When a processor has been placed in an exclusive binding mode, it will execute only LWPs bound to that processor. It will not execute any other LWPs in the system even when the processor is idle. If a kernel driver requires a resource that is available only in the exclusively bound processor, the processor is still available for the kernel driver
even though it is not available for user level LWPs that are not exclusively bound to it.

For example, if a driver is exclusively bound to the processor, and a process requires the service of this device driver, the operating system will temporarily bind the process to the processor and execute the process on the processor for the duration of the driver routine. Once the driver operation is complete, the operating system will unbind the outside process from the processor and restrict itself again only to processes that are bound to the processor. Also, processes that are exclusively bound to a processor are restricted to run only on that processor.


Next topic: Memory management facilities
Previous topic: Software latencies

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004