z/OS concepts
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


How virtual storage addressing works in z/OS

z/OS concepts

z/OS® manages address spaces in units of various sizes; these units are tracked in a virtual address.

Virtual storage is an illusion created by the architecture, in that the system seems to have more memory than it really has. Each user or program gets an address space, and each address space contains the same range of storage addresses. Only those portions of the address space that are needed at any point in time are actually loaded into central storage. z/OS keeps the inactive pieces of address spaces in auxiliary storage. z/OS manages address spaces in units of various sizes, as follows:

  • Page address spaces are divided into 4-kilobyte units of virtual storage called pages.
  • Segment address spaces are divided into 1-megabyte units called segments. A segment is a block of sequential virtual addresses spanning megabytes, beginning at a 1-megabyte boundary. A 2-gigabyte address space, for example, consists of 2048 segments.
  • Region address spaces are divided into 2-8 gigabyte units called regions. A region is a block of sequential virtual addresses spanning 2-8 gigabytes, beginning at a 2-gigabyte boundary. A 2-terabyte address space, for example, consists of 2048 regions.
  • A virtual address, accordingly, is divided into four principal fields: Bits 0-32 are called the region index (RX), bits 33-43 are called the segment index (SX), bits 44-51 are called the page index (PX), and bits 52-63 are called the byte index (BX).
A virtual address has the format shown in Figure 1.
Figure 1. Virtual address format

As determined by its address-space-control element, a virtual address space can be a 2-gigabyte space consisting of one region, or as large as a 16-exabyte space. The RX part of a virtual address for a 2-gigabyte address space must be all zeros; otherwise, an exception is recognized.

The RX part of a virtual address is itself divided into three fields. Bits 0-10 are called the region first index (RFX), bits 11-21 are called the region second index (RSX), and bits 22-32 are called the region third index (RTX). Bits 0-32 of the virtual address have the format shown in Figure 2.

Figure 2. RX field format

A virtual address in which the RTX is the left most significant part (a 42-bit address) is capable of addressing 4 terabytes (4096 regions), one in which the RSX is the left most significant part (a 53-bit address) is capable of addressing 8 petabytes (four million regions), and one in which the RFX is the left most significant part (a 64-bit address) is capable of addressing 16 exabytes (8 billion regions).





Copyright IBM Corporation 1990, 2010