[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs

Identifying Processors

Symmetric multiprocessor machines have one or more CPU boards, each of which can accommodate two processors. For example, a four processor machine has two CPU boards, each having two processors. Commands, subroutines, or messages that refer to processors need to use an identification scheme. Processors are identified by physical and logical numbers, and by Object Data Manager (ODM) processor names and location codes.

Read the following to learn more about identifying processors:

ODM Processor Names

ODM is a system used to identify various parts throughout a machine, including bus adapters, peripherals such as printers or terminals, disks, memory boards, and processor boards. See "Object Data Manager (ODM) Overview for Programmers" for more information about ODM.

ODM assigns numbers to processor boards and processors in order, starting from 0 (zero), and creates names based on these numbers by adding a prefix cpucard or proc . Thus, the first porcessor board is called cpucard0 , and the second processor on it is called proc1 .

ODM location codes for processors consist of four 2-digit fields, in the form AA-BB-CC-DD, as explained below:

AA Always 00 . It indicates the main unit.
BB Indicates the processor board number. It can be 0P , 0Q , 0R , or 0S , indicating respectively the first, second, third or fourth processor card.
CC Always 00 .
DD Indicates the processor position on the processor board. It can be 00 or 01 .

These codes are illustrated in "Example Processor Configurations.

Logical Processor Numbers

Processors can also be identified using logical numbers, which start with 0 (zero). Only enabled processors have a logical number.

The logical processor number 0 (zero) identifies the first physical processor in the enabled state; the logical processor number 1 (one) identifies the second enabled physical processor, and so on.

Generally, all operating system commands and library subroutines use logical numbers to identify processors. The cpu_state command (described below) is an exception and uses ODM processor names instead of logical processor numbers.

ODM Processor States

If a processor functions correctly, it can be enabled or disabled using a software command. A processor is marked faulty if it has a detected hardware problem. Thus, ODM classifies processors using three states. A processor can only be in one of the following states:

enabled Processor works and can be used by AIX.
disabled Processor works, but cannot be used by AIX.
faulty Processor does not work (a hardware fault was detected).

Related Information

Programming on Multiprocessor Systems: Overview

Controlling Processor Use


[ Previous | Next | Contents | Glossary | Home | Search ]