Relationship between the memory object and its owner

Ownership issues are important. If you don't understand them, a memory object that your program creates and uses might cause an abend. A program creates a memory object, but a TCB owns the memory object. The TCB that represents the program is the owner of the memory object, unless the program assigns ownership to another TCB.

The memory object is available to a program whose PSW key matches the storage key of the memory object. The memory object can be accessed by programs running under the owning TCB and other programs running in the same address space.

When a TCB terminates, the system deletes the memory objects that the TCB owns. The system swaps a memory object in and out as it swaps in and out the address space that dispatched the owning TCB.

A memory object can remain active even after the creating TCB terminates if a program assigns ownership of the memory object to a TCB that will outlive the creating TCB. In this case, termination of the creating TCB does not affect the memory object.