Using Data Spaces
Data spaces are
areas of storage that a program can create and access outside its
own virtual machine storage. A program can use data spaces to store
data for its own use and to share with other programs running in other
virtual machines. Using data spaces in an application can improve
overall apparent performance in these ways by:
- Reducing the need for IUCV or APPC/VM interaction between client and server virtual machines
- Replacing virtual I/O, such as DIAGNOSE I/O, with paging I/O (such as data space mapping services), which is more efficient
- Allowing data needed only temporarily to reside in storage rather than using DASD files for it.
Data space support includes sharing capabilities that apply to primary address spaces as well as data spaces. The term data space refers to a data-only address space. The term address space is more general, referring to any contiguous area of virtual storage that is addressable by a virtual machine. In general, address space is used in this book for situations that apply to both primary address spaces and data spaces.
Here are some things to keep in mind as you design data space support
into your application:
- To create a data space, the application must be executing in an XC virtual machine.
- The virtual machine (user ID) in which the application is to run must be authorized to create and delete data spaces. In other words, it must have an XCONFIG ADDRSPACE directory statement.
- If a data space is to be shared among other users or applications, the virtual machine that owns the data space must be authorized to share by specifying the SHARE option on the XCONFIG ADDRSPACE statement.
- Virtual machines that need access to more than 62 address spaces must have a larger access list allocated with an XCONFIG ACCESSLIST directory statement. Although only XC virtual machines can create and directly manipulate data in a data space, ESA and XA virtual machines can copy data from data spaces and can share their primary address space.
- When you create a data space, request a large enough size to handle the needs of your application. You specify the data space size in units of 4KB pages. The amount of storage you specify when you create a data space is the maximum amount the system will allow you to use in that space.
- Data space management can be performed in either primary space or access register execution mode, but to manipulate data in a data space, the application must be running in access-register mode.