system disk. Before this routine is invcked, no free storage
requests .ay be made. If ter" this routine bas been invoked, free
storage requests may be made, but these are subject to the following
restraints until the second frce storage management initialization
routine has been invoked:
All requests for user storage are changed to requests for nucleus
storage. Only partial error checking is performed by the DMSFRET routine.
In particular, it is possible to release a block that was never
allocated.
All requests that are satisfied in high stcrage must be temporary,
because all high storage allocated is released when the second
free storage initialization routine is invoked.
When CP's saved system facility is used, the CMS system is saved
at the point just after the system disk has been accessed. This means that it is necessary for DMSFRE to be used before the Slze of
virtual storage is known, because the saved system can be used on any
size virtual machine. Thus, the first initialization routine
initializes DftSFRE so that limited functions can be requested, while
the second initialization routine performs the initialization
necessary to allow the full functions of DMSFRE to be requested. INIT2--This option is called by DMSINS to invoke the second
initialization routine. This routine is invoked after the size of
virtual storage is known, and it performs the initialization
necessary to allow all the functions of DMSFRE to be used. The
second initialization routine performs the following steps:
Releases all storage that has been allocated in the highstorage
area.
Allocates the FREETIB free storage table. This table contains one
byte for each 4096-byte page of virtual storage, and so cannot be
allocated until the size of virtual storage is known. It is
allocated in the low-address free storage area, if there is enough room available. If not, then it is allocated in the higher free
storage area. For a 256K virtual machine, FREETIB contains 64
bytes; for a 16 million byte machine, it contains 4096 bytes.
The FREETIB table is initialized, and all storage protection keys
are initialized.
All completely non-allocated 4K pages
chain are removed to the user chain.
up operations are performed.
on the nucleus free storage
Any other necessary cleaning CHECK--This option can be called at any time for system debugging
purposes. It invokes a routine that performs a thorough check of all
free storage chains for consistency and correctness. Thus, it checks
to see whether any free storage pointers have been destroyed. CKON--This option turns on a flag which causes the CHECK routine
described in the preceding paragraph to be invoked each time any call
is made to DftSFREE or DMSFRET. This can be useful to pinpoint a
problem that is, for example, destroying free storage management
pointers. Care should be taken when using this option# because the
CHECK routine is coded to be thorough rather than efficient.
2-106 IBM VM/370 System Logic and Program Determination--Volume 2
Thus, after the CKON option has been invoked, each call to DMSFREE or DMSFRET takes many times as long to be completed as before. This can
impact the efficiency of system functions. CKOFF--Use of this option turns off the flag that was turned by the CKON option, described in the preceding paragraph. UREC--This option is called by DMSABN during the ABEND recovery
process to release all USER storage. CALOC--This option is called by DMSABN after the ABEND recovery
process has been completed. It invokes a routine that returns, in
register 0, the number of doublewords of free storage that have been
allocated. This figure is used by DMSABN to determine whether ABEND recovery has been successful. STORAGE PROTECTION KEYS In general, the following rule applies: storage is assigned the
storage key of X'F', while user storage assigned the key of X'E'. This is the storage key associated with the protected areas of storage,
not to be confused with the PSi or CAW key used to access that storage.
The specific key assignments are as follows: The NUCON area is assigned the key of X'F', with the exception of a
half-page containing the OPSECT and TSOBLOKS areas, which has a key
of X'E'. Free storage allocated by DMSFREE is broken up into user storage and
nucleus storage. The user storage has a protection key of X'E', while the nucleus storage has a key of X'P'. The transient program area has a key of X'E'. The CMS nucleus code has a storage key of X'F'. In saved systems,
this entire segment is protected by CP from modification even by the CMS system, and so must be entirely reentrant. The user program area is assigned the storage key of X'E', except for
those pages which contain Nucleus DMSFREE storage. These latter
pages are assigned the key of X'F'. The loader tables are assigned the key of X'F'. CMS SYSTEM HANDLING OF PSi KEYS The CMS nucleus protection scheme protects the CMS nucleus fro.
inadvertent destruction by a user program. This mechanism, however,
does not prevent a user from writing in system storage intentionally.
Because a CMS user can execute privileged instructions, he can issue a LOAD PSi (LPSW) instruction and load any PSi key he wishes. If a user
defeats nucleus protection in this way there is nothing to prevent his
program from: Modifying nucleus code CMS Method of Operation and Program Organization 2-107
Previous Page Next Page