gtpm6m0jMain Supervisor Reference

Managing Address Spaces

TPF supports two types of address spaces, the system virtual memory and the ECB virtual memory. The system virtual memory (SVM) contains all storage that can be used by a particular I-stream and dispenses storage, as needed, to ECBs. Each I-stream has its own SVM. The ECB virtual memory (EVM) contains all storage that can be referenced by an ECB. An ECB can only access storage in its own EVM.

ECBs run in the EVM and control program services run in either the EVM or the SVM. I/O servers execute in the EVM for macro service routines and then switch to the SVM for starting I/O and I/O interrupt routines. I/O servers execute in the SVM for I/O post-interrupt routines that then switch to the EVM for returning to the user. The layouts of both the EVM and SVM are shown in Appendix B, Virtual Storage Layout.

When you write control program code, you must know whether you are in the SVM or EVM. The control program uses the following macros for managing these address spaces:

$GEVAC
To convert SVM addresses to EVM addresses

$GSVAC
To convert EVM addresses to SVM addresses

$SWSPC
To switch between the 2 address spaces

E-type programs use the following macros for managing address spaces:

MOVEC
To move data between the EVM and the SVM in any combination (from EVM to EVM, EVM to SVM, SVM to SVM, and SVM to EVM).

GSVAC
To convert EVM addresses to SVM addresses

For more information about each of these macros, see TPF General Macros.