The processing modes follow. Code always runs in one or more of
these modes. For example, code running in task or service request
block (SRB) mode can also be either locally locked or physically disabled.
- Task mode is the most common processing mode. All programs
given control by ATTACH, ATTACHX, LINK, LINKX, XCTL, and XCTLX macros
run in task mode.
- SRB mode is code that runs from one of the service request
block (SRB) queues.
- Physically disabled mode is reserved for high-priority
system code that manipulates critical system queues and data areas.
This mode is usually combined with supervisor state and key 0 in the
PSW. The combination ensures that the routine can complete its function
before losing control. The mode is restricted to just a few modules
in the system, for example, interrupt handlers, the dispatcher, and
programs that are holding a global spin lock.
- Locked mode is for code that runs in the system while holding
a lock.
- Cross memory mode. Cross memory mode is defined by:
- Access register (AR) mode, where a program can use the
full set of assembler instructions (except MVCP and MVCS) to manipulate
data in another address space or in a data space. Unlike cross memory,
access registers allow full access to data in many address spaces
or data spaces.