Shared  Segments  
If one or more segments of a saved system are designated as being"shared,"   a  sinĀ  
gle copy of these segments in real storage can be used by any virtual machine that
loads the saved system by name. (In attached processor or multiprocessor mode,
there are two sets of pages, page tables, and swap tables maintained for each
shared segment.) A shared segment must be reenterable and the segment number
must be included in theSYSHRSG   operand  of  the  NAMESYS  macro  for  the  saved  
system.
If, for example, you code theSYSHRSG=   operand  of  the  NAMESYS  macro  for  
the system to be saved asSYSHRSG=(29,30,31)   then  segments  29,  30,   and  31  of  the  system  are  to  be  shared.  When  CMS   is  saved,  
via theSA   VESYS   command,  the  pages  in  segments  29,  30,   and  31  are  set  up  so  
that any user loading the saved system by name shares the same set of these pages
in real storage. This results in a saving of both real and external page storage.
Also, the more virtual machines using the shared segment, the more likely it is that
these pages will be frequently referenced and, thereby, kept in real storage. As a
result, the number of page faults and the corresponding time and resources
expended in page swapping is reduced.
Special Considerations for Shared Segments
When a saved system containing one or more shared segments is again saved, a
problem can occur if the previous system has been loaded by name and is still in
use. If users of the"old"   system  continue  to  reference  pages  that  have  already  
been brought into paging storage, no problems will occur. However, if after the
new system has been saved, users of the old system reference pages that had not
previously been referenced, they receive the new version of the referenced page.
Any users who IPL the newly saved system share only the new copy of the shared
segment.
Also, the entire segment is saved by theSA   VESYS   command,  not  just  that  portion  
occupied by the program (for example, CMS), so that unwanted data may also be
contained in the segment.
The use of shared segments is not allowed in a virtual=real machine.
The maximum number of shared segments that may be defined is 78.
Discontiguous Saved Segments
With discontiguous saved segment support, you can attach and detach segments of
storage to and from your virtual machine. These segments contain reenterable
code that can be shared by many users. Thus, programs that are required someĀ
times, but not all the time, can be shared and only loaded when they are needed.
Segments that are to be shared in this manner must be loaded at an address beyond
the normal end of your virtual machine and then must be saved. The procedure for
loading and saving discontiguous segments is similar to the procedure that already
exists for loading and saving systems. Also, discontiguous saved segments can be
attached to your virtual machine in nonshared mode for testing and debugging. In
summary, a discontiguous saved segment is a segment that:
Generating Saved Systems 75
If one or more segments of a saved system are designated as being
gle copy of these segments in real storage can be used by any virtual machine that
loads the saved system by name. (In attached processor or multiprocessor mode,
there are two sets of pages, page tables, and swap tables maintained for each
shared segment.) A shared segment must be reenterable and the segment number
must be included in the
system.
If, for example, you code the
the system to be saved as
via the
that any user loading the saved system by name shares the same set of these pages
in real storage. This results in a saving of both real and external page storage.
Also, the more virtual machines using the shared segment, the more likely it is that
these pages will be frequently referenced and, thereby, kept in real storage. As a
result, the number of page faults and the corresponding time and resources
expended in page swapping is reduced.
Special Considerations for Shared Segments
When a saved system containing one or more shared segments is again saved, a
problem can occur if the previous system has been loaded by name and is still in
use. If users of the
been brought into paging storage, no problems will occur. However, if after the
new system has been saved, users of the old system reference pages that had not
previously been referenced, they receive the new version of the referenced page.
Any users who IPL the newly saved system share only the new copy of the shared
segment.
Also, the entire segment is saved by the
occupied by the program (for example, CMS), so that unwanted data may also be
contained in the segment.
The use of shared segments is not allowed in a virtual=real machine.
The maximum number of shared segments that may be defined is 78.
Discontiguous Saved Segments
With discontiguous saved segment support, you can attach and detach segments of
storage to and from your virtual machine. These segments contain reenterable
code that can be shared by many users. Thus, programs that are required someĀ
times, but not all the time, can be shared and only loaded when they are needed.
Segments that are to be shared in this manner must be loaded at an address beyond
the normal end of your virtual machine and then must be saved. The procedure for
loading and saving discontiguous segments is similar to the procedure that already
exists for loading and saving systems. Also, discontiguous saved segments can be
attached to your virtual machine in nonshared mode for testing and debugging. In
summary, a discontiguous saved segment is a segment that:
Generating Saved Systems 75
 
             
            
































































































































































































































































































































































































































































































































































































































