Memory Allocation Phase

In the memory allocation phase, memory is allocated for class numbers, resource numbers, ID segments, shared programs, system memory block, memory descriptors, System Available Memory (SAM), system common, and system message block. During this phase of the system generation, the program swapping priority and quantum time values are set. The system default libraries that are searched automatically during all program loading of disk subsystems also are specified in this phase.

The immediately following sections describe the operation of the memory allocation phase; the generator commands are then described. As with the other generation phases, the memory allocation phase commands must be entered in the order presented in this chapter.

Allocating Class Numbers

Class numbers are used by any operation that performs class I/O. Class I/O is used for I/O without wait, swappable I/O, and programtoprogram communication. Class I/O is accomplished by calls to EXEC routines 17 through 21, and CLRQ. Each outstanding classget call requires one class number.

As a general rule, you should allocate 10 class numbers, plus one class number for each active program in a program development system. Each subsystem also has its own requirements for class numbers; refer to the associated subsystem manual for details.

If there are not enough class numbers, some of the requests that require them must wait for class numbers to become available and could create a bottleneck. If there are too many class numbers, the unused ones waste memory (two words per unused class number).

If no class numbers are required, you must still include the CLAS command, specifying zero class numbers.

Allocating Resource Numbers

Resource numbers provide the ability to share a resource, either data or program code, among two or more programs. There should be enough resource numbers in your system to cover all of the programs that will try to use them simultaneously.

As a general rule, you should allocate one resource number per every two ID segments in a program development system. If environment variables will be used in the system, allocate one resource number for each session user on the system. Each subsystem has its own resource number requirements; refer to the associated subsystem manual for details.

Not enough resource numbers could cause a bottleneck that slows down your programs, and too many resource numbers will waste memory (one word per unused resource number).

If no resource numbers are required, you must still enter the RESN command, specifying zero resource numbers.

Memory Allocation Phase 71