Multiprocessor Configuration Control

Many service virtual machines and some computationally intensive applications require parallel processing to cope with heavy processing loads. By parallel processing we mean the execution of more than one thread of a particular application at the same time on different real CPUs of the real processor complex. For example, a numeric application may process each column of a table in parallel, if the computations performed on the rows are independent of each other. A different type of example involves a multi-user server like a file server or a database manager. These servers may become saturated with requests. By taking advantage of parallelism they can potentially handle multiple requests at the same time. In general, the goals of parallel processing are to reduce the time a computation takes, increase the capacity of a server, or improve the responsiveness of a server.

CMS provides parallel processing capabilities through the use of CP's virtual multiprocessor support. The CMS virtual machine running the CMS-based application can have more than one virtual CPU, each of which will be used to execute threads. These virtual CPUs, in turn, are dispatched independently by CP. CP can have any one or all of the CPUs for a particular virtual machine in execution at a given time.

The use of virtual CPUs is controlled by CP information and command input. The user directory entry determines how many virtual CPUs can be defined and how many are to be predefined for a particular virtual machine. In the example directory entry, the number given on the MACHINE statement specifies that 64 virtual CPUs can be used by this virtual machine. The CPU statements specify that six of these CPUs should be automatically defined when the user logs on.
USER SERVER1 XXXXXXX 5M 048M G 64
MACHINE XC 64
CPU 0 BASE
CPU 1
CPU 2
CPU 3
CPU 4
CPU 5
ACCOUNT 0372 G37/272
IPL CMS  PARM AUTOCR
CONSOLE  01F 3215
SPOOL    00C 2540 READER A
SPOOL    00D 2540 PUNCH A
SPOOL    00E 1403
LINK $MAINT 190 190 RR
LINK CMSGEN 19F 19F RR
      .
      .
      .
MDISK 0191 3390 300 10 CMS888 MR

If the application requires more CPUs than those automatically defined, it can use the VCPUCreate function to dynamically define additional virtual CPUs (up to the limit specified in the directory) while the application is running. As soon as the CPU is defined, CMS begins dispatching threads on it within the constraints imposed by dispatching classes. See Dispatching Classes for an explanation of thread dispatching classes and their implications. Essentially, the number of CPUs that can be used is equal to the number of thread dispatch classes the application has created. If all threads are assigned to different classes, all the CPUs can be exploited to the fullest.