VIRTUAL MACHINE TIME MANAGEMENT The real processor simulates multiple virtual processors. Virtual machines that are executing in a conversational manner are given access
to the real processor more frequently than those that are not; these
conversational machines are assigned the smaller of two possible time
slices. CP determines execution characteristics of a virtual machine at
the end of each time slice on the basis of the recent frequency of its
console requests or terminal interrupts. The virtual machine is queued
for subsequent processor utilization according to whether it is a
conversational or nonconversational user of system resources.
A virtual machine can gain control of the processor only if it is not
waiting for some activity or resource. The virtual machine itself may
enter a virtual wait state after an input/output operation has begun.
The virtual machine cannot gain control of the real processor if it is
waiting for a page of storage, if it is waiting for an input/output
operation to be translated and started, or if it is waiting for a CP
command to finish execution.
A virtual machine can be assigned a priority of execution. Priority
is a parameter affecting the execution of a particular virtual machine
as compared with other virtual machines that have the same general
execution characteristics. Priority is a parameter in the virtual
machine's VM/370 directory entry. The system operator can reset the
value with the privilege class A SET command. VIRTUAL MACHINE STORAGE MANAGEMENT The normal and maximum storage sizes of a virtual machine are defined as
part of the virtual machine configuration in the V"/370 directory. You may redefine virtual storage size to any value that is a multiple of 4K
and not greater than the maximum defined value. V"/370 implements this
storage as virtual storage. The storage may appear as paged or unpaged
to the virtual machine, depending upon whether or not the extended
control mode option was specified for that virtual machine. This option
is required if operating systems that control virtual storage, such as OS/VS1 or VM/370, are run in the virtual machine.
Storage in the virtual machine is logically divided into 4096-byte
areas called pages. A complete set of segment and page tables is used
to describe the storage of each virtual machine. These tables are
updated by CP and reflect the allocation of virtual storage pages to
blocks of real storage. These page and segment tables allow virtual
storage addressing in a System/370 machine. Storage in the real machine
is logically and physically divided into 4096-byte areas called page
Only referenced virtual storage pages are teFt in real storage, thus
optimizing real storage utilization. Further, a page can be brought into
any available page frame; the necessary relccation is done during
program execution by a combination of VM/370 and dynamic address
translation on the System/370. The active pages from all logged on
virtual machines and from the pageable routines of CP compete for
available page frames. When the number of page frames available for
allocation falls below a threshold value, CP determines which virtual
storage pages currently allocated to real storage are relatively
inactive and initiates suitable page-out operations for them.
76 IBM V!/370 System Programmer's Guide
Inactive pages are kept on a direct access storage device. If an
inactive page bas been changed at some time during virtual machine
execution, CP assigns it to a paging device, selecting the fastest such device with available space. If the page has not changed, it remains
allocated in its original direct access location and is paged into real
storaqe from there the next time the virtual machine references that
page. - A virtual machine program can use the DIAGNOSE instruction to
tell CP that the information from specific pages of virtual storage is
no longer needed; CP then releases the areas of the paging devices which
were assigned to hold the specified pages. Paging is done on demand by CP. This means that a page of virtual
storage is not read (paged) from the paging device to a real storage
block until it is actually needed for virtual machine execution. CP makes no attempt to anticipate what pages might te required by a virtual
.achine. While a paging operation is performed for one virtual machine,
another virtual machine can be executing. Any paging operation
initiated by CP is transparent to the virtual machine.
If the virtual machine is executing in extended control mode with
translate on, then two additional sets of segment and page tables are
kept. The virtual machine operating system is responsible for mapping
the virtual storage created by it to the storage of the virtual machine.
CP uses this set of tables and the page and segment tables created for
the virtual machine at logon time to build shadow page tables for the
virtual machine. These shadow tables Bap the virtual storage created by
the virtual machine operating system to the storage of the real
computing system. The tables created by the virtual machine operating
system may describe any page and segment size permissible in the IBM System/370. YM/370 provides both fetch and store protection for real storage. The
contents of real storage are protected from destruction or misuse caused
by erroneous or unauthorized storing or fetching by the program.
Storage is protected from improper storing or from both improper storing
and fetching, but not from improper fetching alone. When protection applies to a storage access, the key in storage is
compared with the protection key associated with the request for storage
access. A store or fetch is permitted only when the key in storage matches the protection key. When a store access is prohibited because of Frotection, the contents
of the protected location remain unchanged. On fetching, the protected
information is not loaded into an addressable register, moved to another
storage location, or provided to an I/O device. When a processor access is prohibited because of protection, the
operation is suppressed or terminated, and a program interruption for a
protection exception takes place. When a channel access is prohibited,
a protection-check condition is indicated in the channel status word (CSW) stored as a result of the operation. Part 2. Control program (CP) 77
Previous Page Next Page