April 1, 1981 (DMSFRET) The block of storage that is being released was
never allocated by DMSFREE. such an error is detected if one of the following errors is found: The block does not lie entirely inside either the low
storage free storage area or the user proqram area between FREELOWE and FREEUPPR. The block crosses a
allocated for USER NUCLEUS type storage.
page boundary
storaqe from
that separates a page
a page allocated for The block overlaps another block already on the free
storaqe chain.
7 (DMSFRET) The address given for the block being released is
not doubleword aligned.
8 (DMSFRES) An invalid request code vas passed to the DKSFRES routine. Since all request codes are generated by the DKSFRES macro, this error code should never appear.
9 (DMSFREE, DMSFRET, or DMSFRES) Unexpected and unexplained
error in the free storage management routine. eMS Handling of PSW Keys
The purpose of the CMS Nucleus protection scheme is to protect the CMS nucleus from inadvertent destruction by a user program. Without it, it
would be possible, for example, for a FORTRAN user who accidentally
assigns an incorrectly subscripted array element to destroy nucleus
code, wipe out a crucial table or constant area, or even destroy an
entire disk by destroying the contents of the master file directory.
In general, user programs and disk-resident CMS commands are executed
with a PSW key of X'E', while nucleus code is executed with a PSi key of X' 0'.
There are, however, some exceptions to this rule. Certain
disk-resident CMS commands run with a PSW key of X'O', since they have a
constant need to modify nucleus pointers and storage. The nucleus
routines called by the GET, PUT, READ, and WRITE macros run with a user PSW key of X'E', to increase efficiency.
Two macros are available to any routine that wishes to change its PSi key for some special purpose. These are the DMSKEY macro and the DMSEXS macro.
The DMSKEY macro may be used to change the PSW key to the user value
or the nucleus value. The DMSKEY NUCLEUS option causes the current PSW key to be placed in a stack, and a value of 0 to be placed in the PSi key. The DMSKEY USER option causes the current PSi key to be placed in
a stack; and a value of X'E' to be placed in the PSW key. The DMSKEY RESET option causes the top value in the DMSKEY stack to be removed and
re-inserted into the PSW. It is a requirement of the CMS system that when a routine terminates,
the DMSKEY stack must be empty. This means that a routine should
execute a DMSKEY RESET option for each DMSKEY NUCLEUS option and each DMSKEY USER option executed by the routine. Part 3. Conversational Monitor System (CMS) 255
Page of GC20-1807-7 As Updated April 1, 1981 by TNL GN25-0829
The DMSKEY key stack has a current maximum depth of seven for each
routine. In this context, a "routine" is anything invoked by an SVC call.
The DMSKEY LASTUSER option causes the current PSi key to be placed in
the stack, and a new key inserted into the PSW, determined as follows:
the SVC system save area stack is searched in reverse order (top to
bottom) for the first save area corresponding to a user routine. The PSW key that was in effect in that routine is then taken for the new PSW key. (If no user routine is found in the search, then LASTUSER has the
same effect as USER.) This option is used by as macro simulation
routines when they wish to enter a exit routine; the exit
routine is entered with the PSi key of the last user routine on the SVC system save area stack.
The NOSTACK option of DMSKEY may be used with NUCLEUS, USER, or LASTUSER (as in, for example, DMSKEY NUCLEUS, NOSTACK) if the current key
is not to be placed on the DMSKEY stack. If this option is used, then
no corresponding DMSKEY RESET should be issued.
The DMSEXS ("execute in system mode") macro instruction is useful in
situations where a routinp. is being executed with a user protect key,
but wishes to execute a single instruction that, for example, sets a bit
in the NUCON area. The single instruction may be specified as the
argument to the DMSEXS macro, and that instruction will be executed with
a system PSW key. Programs that modify or manipulate bits in DftSNUC or
other CMS control blocks may, however, hinder the operation of CMS causing it to function ineffectively.
Whenever possible, CMS commands are executed with a user protect key.
This protects the CMS Nucleus in cases where there is an error in the
system that would otherwise destroy the nucleus. If the command
must execute a single instruction or small group of instructions that
modify nucleus storage, then the DMSKEY or DMSEXS macros are used, so
that the system PSi key will be used for as short a period of time as is
possible. CMS SVC Handling DMSITS (INTSVC) is the CMS system SVC handling routine.
operation of DMSITS is as follows:
The general
1 The S VC new PS W (low storage loca tion X' 60') contains, in the address field, the address of DMSITS1. The DMSITS module will be
entered whenever a supervisor call is executed.
2. DMSITS allocates a system and user save area. The
is used as a register save area (or work area)
routine.
3. The called routine is called (via a LPSW or BALR).
user save a.rea by the called
4. Upon return from the called routine, the save areas are released.
5. Control is returned to the caller (the routine that originally made
the SVC call).
256 System programmer's Guide
Previous Page Next Page