Why Use Saved Segments?

Defining frequently used data and code (such as licensed programs) as saved segments provides several advantages:
  • Because several users can access the same physical storage, real storage use is minimized.
  • Using saved segments decreases the I/O rate and DASD paging space requirements, thereby improving virtual machine performance.
  • Saved segments attached to a virtual machine can reside above its defined virtual storage. This allows the virtual machine to use its defined storage for other purposes.

Saved segments allow code or data in an area of virtual storage to be saved and assigned a name. A saved segment can then be dynamically attached to, and detached from, a virtual machine.

Programs residing within the page ranges of a saved segment that are reenterable can be shared by concurrently operating virtual machines. This allows you to place code that is required only some of the time in a saved segment and load it into a virtual machine when needed.

Note that a saved segment differs from a named saved system (NSS) in that a DIAGNOSE code X'64' loads it rather than an IPL.

Figure 1 shows how different virtual machines can access the same saved segment in z/VM®.

Skip over ASCII art..

Figure 1. Sharing Saved Segments

                                                            +----------+
                                                            |xxxxxxxxxx|
                                                            |xxxxxxxxxx|
                                 +----------+. . . . . . . .+----------+
                                 |  appl─B  |. . . ..       | reserved |
                                 +----------+       .       +----------+
                                    saved           .       |xxxxxxxxxx|
                                    segment         .       |xxxxxxxxxx|
                                                    .       |xxxxxxxxxx|
                                                    .       |xxxxxxxxxx|
                                                    .       |xxxxxxxxxx|
 16MB <-|-------------|-------------------------------------|xxxxxxxxxx|->
        +----------+             +----------+       .       +----------+
        | reserved | . . ... . . |  appl─A  |. . . ... . . .| reserved |
        +----------+            .+----------+.      .       +----------+
        |xxxxxxxxxx|           .    saved     +----------+  |xxxxxxxxxx|
        |xxxxxxxxxx|          .     segment   |xxxxxxxxxx|  |xxxxxxxxxx|
        |xxxxxxxxxx|         .                |xxxxxxxxxx|  |xxxxxxxxxx|
        |xxxxxxxxxx|  +----------+            |xxxxxxxxxx|  |xxxxxxxxxx|
        |xxxxxxxxxx|  |xxxxxxxxxx|            |xxxxxxxxxx|  |xxxxxxxxxx|
        |xxxxxxxxxx|  |xxxxxxxxxx|            |xxxxxxxxxx|  |xxxxxxxxxx|
        |xxxxxxxxxx|  |xxxxxxxxxx|            |xxxxxxxxxx|  |xxxxxxxxxx|
        |xxxxxxxxxx|  |xxxxxxxxxx|            |xxxxxxxxxx|  |xxxxxxxxxx|
        |xxxxxxxxxx|  |xxxxxxxxxx|            |xxxxxxxxxx|  |xxxxxxxxxx|
        |xxxxxxxxxx|  |xxxxxxxxxx|            |xxxxxxxxxx|  |xxxxxxxxxx|
        +----------+  +----------+            +----------+  +----------+
        |   CMS    |  |   CMS    |            |   CMS    |  |   CMS    |
        |          |  |          |            |          |  |          |
        +----------+--+----------+------------+----------+--+----------+
        |                                                              |
        |                                                              |
        |                          CP                                  |
        |                                                              |
        +--------------------------------------------------------------+
        |                                                              |
        |                      Processor                               |
        |                                                              |
        |                                                              |
        |                                                              |
        +--------------------------------------------------------------+

Application B operates from a saved segment residing above the 16 MB line so it executes in 31-bit addressing mode. Also, note that the virtual machine with greater than 16 MB of storage has both application A and B attached, causing two areas of its address space to be reserved.