Modernization Hub

Cross-Memory

Enhanced Definition

Cross-memory is a z/OS facility that allows a program executing in one address space to directly access data located in another address space. It provides a highly efficient mechanism for inter-address space communication by enabling direct read/write operations without requiring traditional data transfer methods or extensive context switching overhead for each access.

Key Characteristics

    • Direct Data Access: Programs can read and write data in a target address space using standard machine instructions (e.g., L for Load, ST for Store) as if the data were in their own address space.
    • Performance Optimization: Significantly reduces overhead compared to traditional inter-address space communication methods (like SVC calls or message passing) by avoiding data copying and minimizing context switches.
    • Access Register Mode (AR Mode): Relies on Access Registers (ARs) to specify the target address space for data access. The program must be running in AR Mode to utilize cross-memory services.
    • Authorization Required: Establishing and using cross-memory access requires specific authorizations, such as APF authorization, a privileged PSW key, or SAF (System Authorization Facility) profiles, to maintain system integrity and security.
    • Program Call (PC) and Program Transfer (PT): Cross-memory environments are typically established and managed using PC (Program Call) and PT (Program Transfer) instructions, which facilitate controlled transitions between address spaces or access to cross-memory services.
    • Address Space Context: While accessing another address space's storage, the executing program generally retains its own address space's context (e.g., TCB, dispatching priority, ASID).

Use Cases

    • High-Performance Subsystem Communication: Critical subsystems like CICS, DB2, and IMS use cross-memory to share control blocks, buffers, and other data structures efficiently between their various address spaces or with other system components.
    • System Services Implementation: Core z/OS services and components utilize cross-memory to inspect or modify data in other address spaces for functions such as system monitoring, resource management, and security enforcement (RACF).
    • Data Sharing Between Applications: Applications requiring very high-speed data exchange, where the overhead of traditional communication methods is unacceptable, can leverage cross-memory for shared data segments.
    • Monitoring and Debugging Tools: System-level monitoring and debugging utilities often employ cross-memory techniques to gain direct access to the private storage of other running programs or address spaces for diagnostic purposes.

Related Concepts

Cross-memory access is a foundational z/OS capability that enables high-performance inter-address space communication, underpinning many critical system functions and subsystems. It works in conjunction with Access Register Mode and the Access Registers to define the target address space for data access. It provides a more direct and efficient alternative to SVC calls or SRBs for data transfer, especially for large volumes of data or frequent accesses, by allowing direct memory manipulation rather than requiring data copying or context switching for every operation.

Best Practices:
  • Judicious Use: Employ cross-memory only when absolutely necessary for performance-critical scenarios, as its complexity and potential for system impact are higher than standard inter-program communication.
  • Strict Authorization: Ensure robust security controls are in place, leveraging APF authorization, PSW keys, and SAF profiles, to prevent unauthorized programs from establishing or exploiting cross-memory access.
  • Data Integrity and Serialization: Implement stringent serialization mechanisms (e.g., ENQ/DEQ, Latches, Compare and Swap instructions) to maintain data integrity when multiple address spaces concurrently access shared cross-memory data.
  • Thorough Error Handling: Design comprehensive error handling routines to manage potential issues like protection exceptions (0C4 abend) or invalid addresses, which can occur during cross-memory operations.
  • Clear Documentation: Meticulously document the shared data structures, access protocols, and authorization requirements for any cross-memory implementation to facilitate maintenance and debugging.

Related Vendors

Tone Software

14 products

IBM

646 products

Trax Softworks

3 products

Related Categories

Operating System

154 products

Automation

222 products

Browse and Edit

64 products