Domains can send messages to other domains by invoking gate keys, or to the kernel by invoking primary keys. These messages can be sent upon explicit instruction of the program, or implicitly upon exceptional circumstances called traps or faults. These exceptional circumstances include invalid instructions in the program or reference to invalid portions of a segment.
The most common action of a domain is to execute the instructions found in the domain's segment. In the absence of traps, faults, or key invocations, these actions only change the domain and the domain's addressing segment.
Three types of keys, domain, start, and resume, cause the kernel to view the node they designate as a domain root.
A well-formed domain root contains node keys that designate two other nodes. Together, these three nodes form the domain. Nothing in the nodes specifically identifies them as part of a domain; when describing them as a domain, they are presumed to be well-formed.
C0 holds the domain's brand. It is used with the domain tool key for rights amplification and is inaccessible through a domain key. It does not influence the execution of the domain.
C1 holds a meter key that indicates authority to expend resources. The domain is said to depend on the meter.
C2 holds a key to the domain keeper.
C3 defines the root of the addressing segment. It holds a memory key.
C4 is a data key whose right 6 bytes hold the domain PSW. Parts of the domain PSW correspond to parts of the S/370 PSW described in the IBM System/370 Principles of Operation. Some parts of the S/370 PSW are inaccessible to domains. The format of the domain PSW is (each character designates a bit):
If P is 1, C7 through C9 will control the PER hardware.
CC is the condition code and MMMM is the program mask.
LL is 11 if SVC 253, 254, and 255 are to be interpreted as key invocations, and 00 otherwise.
AAAA AAAA AAAA AAAA AAAA AAAA is the instruction address.
C5 holds a data key which defines the trap code. It must be DK(0) for the domain to run.
C6 holds a data key which controls the monitor call trap. See the section in this chapter entitled "Program Surveillance".
C7 through C9 hold data keys which control the Program Event Recording hardware. PER traps will not occur unless the P bit of C4 is one. See the section in this chapter entitled "Program Surveillance".
C10 and C11 do not influence the process in the domain. They may be used for the convenience of the domain key holder.
C12 holds a data key which contains the priority of the domain. It is maintained by the kernel when the process-running bit of the domain root is TRUE. C12 is inaccessible through a domain key.
C13 is the busy flag. It holds DK(0) while the domain is available and holds DK(1) while it is busy. It is maintained by the kernel when the process-running bit of the domain root is TRUE. C13 is inaccessible through a domain key.
C13 will receive a DK(0) when the domain becomes available and may receive DK(0) at times after it becomes available until it is entered again with a start key or the node is severed. The kernel will not place anything except DK(0) or DK(1) in C13. If something else is placed in this slot the domain may not run. C13 will receive DK(1) any time the domain's process-running bit is one.
C14 holds a node key to the keys node. It is used with the domain tool key and is inaccessible through a domain key.
C15 holds a node key to the registers node. It is used with the domain tool key and is inaccessible through a domain key.
Programming note: C10 is frequently used to hold a segment key to the symbol table for the domain's keeper.
If the domain is allowed to invoke keys (determined by the "LL" bits in C4), the key registers are controlled directly by the program in the domain. If the domain is not allowed to invoke keys, the key registers are inaccessible to the program.
As the process in the domain changes the general and floating registers, these data key values change. This operation may be optimized (the values cached) so the domain executes instructions that change registers at the full execution speed of the underlying hardware.
Bytes in these data key values, other than the right 6 bytes, do not affect the registers and vice versa.
A process in a malformed domain will not issue instructions or take other actions; it may vanish (with no trace) or cause a trap. The following circumstances cause a domain root node to be considered malformed:
Programming note: This document describes domains as if they are not primitive. This means that programs outside the kernel build domains from nodes. The system was designed to allow only one program, the domain creator, to hold the domain tool key and thus be the only program that depends on the particular way domains are built from nodes.
Some implementations may have domains as a primitive object. In these implementations, there would be no domain tool. The domain creator, which will return a domain key to a new domain, would instead be a part of the kernel. Programs should not depend on this difference.
A domain in the running state will take the following actions.
If either the domain's C1 contains a valid meter key, or its trap code begins with X'0500000001' (the code for meter traps) then: