DIV - Data In Virtual
DIV (Data In Virtual) is a z/OS facility that allows an application to map a portion of a data set or an entire data set into its virtual storage, treating it as if it were main memory. It provides a high-performance mechanism for accessing and sharing data by minimizing physical I/O operations.
Key Characteristics
-
- Virtual Storage Mapping: Maps data from a DASD data set directly into an application's virtual storage, making it accessible via standard memory instructions.
- Windowing Mechanism: Applications define "windows" into the mapped data, allowing them to access specific portions without loading the entire data set into memory.
- Reduced I/O: Once data is brought into virtual storage via DIV, subsequent accesses to that data within the window do not require physical I/O, significantly improving performance.
- Data Integrity: z/OS manages data integrity, ensuring that changes made through DIV are eventually written back to the physical data set.
- Shared Access: Multiple address spaces can map the same data set using DIV, enabling efficient sharing of data across different applications.
- APPC/MVS Integration: Can be used in conjunction with APPC/MVS to share data across different z/OS systems, extending the concept of shared virtual storage.
Use Cases
-
- High-Performance Data Caching: Applications needing fast, repeated access to static or slowly changing reference data can map it into virtual storage using DIV.
- Shared Configuration Data: Multiple system components or applications can access a common configuration data set efficiently without complex inter-process communication.
- Inter-Address Space Communication: Facilitates high-speed data exchange between different address spaces on the same z/OS system by mapping a shared data set.
- Large Data Structure Manipulation: Allows applications to work with very large data structures that exceed available real memory by mapping them virtually and accessing parts on demand.
Related Concepts
DIV heavily relies on the z/OS virtual storage architecture, extending the concept of data spaces by providing a mechanism to map persistent data sets directly into virtual memory. It complements APPC/MVS by enabling the sharing of these virtual data objects across networked z/OS systems, acting as a high-performance alternative or supplement to traditional file I/O or message-based communication for shared data. It provides a mainframe equivalent to memory-mapped files found in other operating systems.
- Careful Window Management: Define windows strategically to encompass frequently accessed data, minimizing the overhead of window manipulation.
- Synchronization for Shared Data: When multiple applications modify shared data via DIV, implement robust synchronization mechanisms (e.g., ENQ/DEQ, latches) to prevent data corruption.
- Error Handling: Implement proper error handling for DIV macro calls (
DIV,VDEFINE,VDELETE,VGET,VPUT) to manage situations like data set unavailability or access violations. - Performance Monitoring: Monitor DIV usage and performance using system tools (e.g., RMF, SMF) to ensure it's providing the expected benefits and identify potential bottlenecks.
- Security Considerations: Ensure appropriate RACF or equivalent security profiles are in place for the underlying data sets to control access to the data mapped via DIV.