• Aucun résultat trouvé

VIRTUAL MACHINES

Dans le document A Guide to the IBM 4331 Processor (Page 181-200)

This section discusses the basic concepts, general operation, and advantages of virtual machines, as defined and implemented in Virtual Machine Facility/370. No previous knowledge of virtual machines is

assumed .•

The virtual machine concept is a logical extension of the virtual storage concept and requires support of multiple virtual storages,.

Therefore, VM/370 can execute only with System/370 mode in effect in 4300 Processors,. Comprehension of dynamic address translation hardware and virtual storage concepts, terminology, and advantages, as discussed in Sections 15:05 and 15:10, is assumed,.

VM/370 consists of the Control program (CP), Conversational Monitor System (CMS), Remote Spooling Communications subsystem (RSCS), and Interacti ve Problem Control System (IPCS) components,. CP supports the concurrent operation of multiple virtual machines,. CMS, operating in a virtual machine under CP control, provides conversational time-sharing facilities to a single user,. RSCS, operating in a virtual machine under CP control, provides for the transmission of data between remote users and virtual machines via binary synchronous communications lines. IPCS, operating in a CMS virtual machine, provides interactive problem

management, problem determination, and problem isolation.

VM/370 is the successor to CP-67/CMS.. Virtual machine support was first provided by IBM in CP/67.. In the CMS time-sharing environment in which CP-67/CMS was primarily used, the major advantage of the virtual machine facility was that i t enabled each CMS user to appear to have a complete System/360 (Model 22 to 75) at his disposal and to be isolated from all other CMS users. Each CMS user had access only to his own virtual machine and, therefore, could not inadvertently interfere with the operation of other CMS virtual machines. VM/370 also provides these facilities and can be used in nondedicated time-sharing environments to provide other advantages as well.

18:05 DEFINITION AND GENERAL OPERATION

A virtual machine is a functional simulation of a complete computer system, including a virtual processor, virtual storage, virtual

channels, virtual I/O devices, and a virtual operator's console, that appears to the user to be a real machine. In a VM/370 environment, a virtual machine is the functional equivalent of a 4331 or 4341 Processor or a system/370 processor (Models 135 to 168 and 3033, 3032, and 3031 Processors) and its associated I/O devices.

-The control program (CP) component of VM/370, executing in a real machine (4300 Processor operating in System/370 mode, System/370 Models 135 through 168 with dynamic address translation hardware, and 3033, 3032, and 3031 Processors), supports concurrent operation of multiple virtual machines using multiprogramming techniques that enable real machine resources to be shared by multiple virtual machines. Each virtual machine is dedicated to a single user and isolated from other virtual machines. None of the components of one virtual machine can be

accessed by a program that is executing in another virtual machine except via the controlled sharing facilities that are provided by CP.

The operation of a virtual machine and scheduling of the work it performs are handled by an operating system rather than by CP. That is, each virtual machine has an operating system executing in it that

allocates machine resources and schedules the execution of problem

programs just as if the operating system were executing in a real machine .•

In order to initiate operations in a virtual machine, the user must log on the virtual machine and IPL an operating system in it. The logon procedure establishes a connection with CP and the existence of a

specific virtual machine for this user. A logon is performed using a console or terminal device of the type that CP supports as a virtual operatorll s console .•

The virtual operator,1 s console is the means by which the user

controls the operation of his virtual machine and communicates'with the operating system executing in it.. CP provides a set of commands that

(1) simulate the system control panel or operator console of the virtual machine, (2) provide for alteration of a virtual machine configuration,

(3) request various services from CP for a virtual machine, and (4) control operation of the real machine.. When a CP command is entered via the virtual operatorll s console, CP receives control and performs the required functions.

communication between the user and the operating system is

accomplished using the operating system command language and the virtual operator" s console.. CP performs any simulation required to make the real I/O device the operator is using as a virtual operator's console appear to be the primary console device type that is defined for the operating system.

In a VM/370 environment, a virtual operator'l s console is frequently called a remote terminal because, in most cases, a terminal device type is actually used as the virtual operator" s console device. However, the real I/O device that is used as the virtual operator's console can be a console device for the specific processor as well as a local or remote terminal .•

VM/370 supports execution of anyone of the following System/360 and System/370 operating systems in a virtual machine:

• CMS component of VM/370

• RSCS component of VM/370

• DOS Version 3, DOS Version 4, DOS/vS, or DOS/VSE (DOS/VSE operating in a virtual machine must be generated to support System/370 mode when VM/370 is executing in a 4331 or 4341 Processor)

• APL 360-DOS

• OS PCP, MFT, or MVT

• OS ASP Version 3

• OS/VSl

• OS/VS2 SVS (Releases 1, 1 .• 6, and l;e 7)

• OS/VS2 MVS (Releases 2 and up) operating in uniprocessor mode only

• PS44

• VM/370

Any number and combination of the above operating systems can execute concurrently in a VM/370 environment, subject to the availability of the required real machine resources, including multiple copies of the same operating system (DOS/VSE executing in more than one virtual machine,

for example).. With a few exceptions, all the facilities that are

supported by these operating systems when they execute in a real machine can be used when the operating system executes in a virtual machine in a VM/370 environment,. Figure 18 .• 05.1 conceptually illustrates the real and virtual machine environment that is supported by VM/37 0,.

Each virtual machine that is to be supported by CP must be user-defined and the definition stored in a VM/370 directory,. The size of virtual storage, virtual I/O devices to be used, options to be used, and a virtual· console are usually specified. Virtual machine configurations can be different from each other and, within ~ertain limitations,

different from that of the real machine in terms of these specifications.

Virtual Instruction processing Function Simulation

CP is resident in processor storage during operation of the real machine. It controls the operation of the real machine, schedules the execution of virtual machines, and simulates virtual machine hardware components using the hardware components of the real machine. In order to be able to perform its functions and isolate virtual machines from each other, CP must have exclusive control over the status and modes of operation of the real machine, as does the control program of an

operating system. Hence, CP always executes with the real machine in supervisor state and receives control after all real machine

interruptions .•

Virtual machines always operate with the real machine in problem . state. Therefore, any time any program that is executing in a virtual

machine issues a privileged instruction, an interruption occurs in the real machine,. CP receives real machine control and takes the required action. This may involve simulating execution of the privileged

instruction for the ,virtual machine or returning real machine control to the control program in the virtual machine for which the interruption occurred so that the interruption can be processed by that control program.. In this manner, CP maintains control of the real machine,. In addition, CP simulates the existence of both a supervisor state and a problem state in the virtual machine while, in reality, the virtual machine operates only in problem state.

CP gives control of the real machine to operating virtual machines on a time-shared basis to simulate the existence of multiple processors. A virtual machine can execute any 4331 Processor instruction except SET CLOCK, which is treated as an NOP because CP controls the setting of the time-of-day clock, and the instructions that are valid only when

ECPS:VSE mode is in effect. In addition, the DIAGNOSE instruction is res,erved for communication between executing operating systems and CP.

The processor features that are used by the control and problem programs executing in a virtual machine must be present in the real machine in which CP executes. CP does not simulate the existence of processor hardware features that are not present in the real machine. A virtual machine can appear to be executing in System/370 mode with

either BC mode or EC and DAT modes specified, depending on the mode required by the operating system executing in it.. However, EC and DAT modes are always specified in the real processor when a virtual machine is executing since dynamic address translation hardware is required to support the existence of virtual storage for the virtual machine. A virtual machine cannot appear to be executing in ECPS:VSE mode.

Virtual I/O units

User 1 Virtual machine 1

User 1

Card punch(es)

Card Reader(s)

Other I/O device types

Simulated Virtual Machine Environment Virtual I/O units

Operating system

operator's console

User 2 Virtual machine 2

Virtual I/O units

Operating system

operator's console User 3 Virtual machine 3

Real Machine User 2

Virtual operator's console

Direct access storage

User 3

Real machine

Direct Direct

access access

storage storage

Virtual I/O units

operator's console User N Virtual machine N

User N

Other I/O device types

Figure 18.05.1. conceptual illustration of the real and virtual machine environment that is supported by VM/370

Virtual storage Simulation

The. implementation of virtual storage in a virtual machine . environment is conceptually illustrated in Figure 18,.05,.2,. Each virtual machine can have up to 16,777,216 bytes of virtual storage, which is the maximum virtual storage size for the 4331 Processor.. The existence of virtual storage for a virtual machine is simulated by CP using DAT

hardware and external page storage, as for a virtual storage environment that is supported in System/310 mode (discussed in Section 15).

Real Storage CP

Pages of virtual storage for operati ng virtual machines

Demand Paging

Contents of virtual storage for virtual machines 1 to N

Virtual machine 1 virtual storage

Control program

Problem programs

Virtual machine 2 virtual storage

Control program

Program programs

Virtual machine N virtual storage

Control program

Problem programs

Figure 18. OS,. 2,. Conceptual illustration of the implementation of virtual storage in a virtual machine environment Operating system programs that are executing in a virtual machine (both control and problem programs) are paged in and out of processor

storage in the real machine on a demand paged basis as they execute.

Processor storage allocation, external page storage allocation, and paging operations are handled entirely by CP and are transparent to the

When a virtual storage operating system is executing in a virtual machine, CP constructs and maintains a third set of tables using the contents of the other two sets of tables,. The third set of tables, a shadow segment table and shadow page tables, are the tables that are actually used for, address translation when the virtual machine operates.

The shadow tables are used to translate addresses in the virtual storage the operating system supports to addresses in real storage. In the 4331 Processor, these real storage addresses are then translated into program processor storage addresses in the real machine using the processor storage directo~y, as discussed previously.

virtual I/O Component Simulation

The virtual channels, control units, and I/O devices defined in each virtual machine configuration are simulated by CP using real channels, control units, and I/O devices that are of the same type. While each virtual I/O device defined must have a real I/O device counterpart in

the

real machine configuration, there does not necessarily have to be a

one-to-o~e correspondence. In addition, the I/O device addresses

assigned to virtual I/O devices need not be the s~me as the addresses of their real I/O device counterparts.

CP also allows a virtual direct access device to be simulated by only a portion of

a

real direct access device volume,. Such a virtual direct access device is called a minidisk.. Support of a minidisk facility enables one real direct access device to simulate the existence of

sev~ral virtual direct access devices of the same type and thus provides

mor~ effecient use of available direct access storage.

Virtual I/O devices are always simulated on a real I/O device of the same devic~. type unless the spooling facility of CP is used.. (CP also allows 2311'disk storage to be simulated using 2314/2319 disk storage and the m~riidisk facility.) The local spooling capability of CP provides data transcription between unit record devices and direct access storage devices and is functionally similar to the POWER

component of "DOS, DOS/vS, and DOS/VSE, OS readers and writers, OS HASP, and OS/VS J~S. In effect, the CP spooling facility enables virtual unit record devices (card readers, card punches, and printers) to be

simulated using direct access storage,. CP also provides console spooling and a remote spooling facility.

The virtual I/O devices in a virtual machine configuration are logically controlled by the operating system that is executing in the virtual machine rather than by CP. That is, all the data management routines of the operating sys·tem (physical record processing, logical record processing, and error recovery routines) execute as usual.

Therefore, a virtual machine I/O configuration can include any I/O device types that are supported by the operating systems that will execute in the virtual machine, as long as real I/O device counterparts exist in the real machine I/O configuration as required.

CP controls only the scheduling and actual initiation of virtual machine I/O operations: in the reai machine. When a START I/O

in~truction is issued by an operating system control program that is executing in a virtual machine, a privileged operation exception interruption occurs and CP receives real processor control. CP

translates the virtual I/O device address to its counterpart real I/O device address and, for minidisks,converts virtual cylinder addresses to corresponding ~eal cylinder addresses, as required. CP also performs the necessary channel program translation and page-locking operations and queues the I/O request if it cannot be started.

'After the I/O operation is started, CP returns the condition code to the operating system control program' that initiated the I/O request so

that appropriate action can be taken,. When the I/O operation completes initiating I/O requests, handling I/O interruption processing, and performing error recovery procedures,. processor-busy time was measured in a representative DOS/VSE Advanced Functions batch environment under VM/370 when compared to operation of the same workload and VM/370 control program without the use of

ECPS:VM/370.

The ECPS:VM/370 feature for the 4331 Processor consists of the

Virtual Machine Assist, Expanded Virtual Machine Assist, Control Program Assist, and Virtual Interval Timer Assist components. Operation of the and Expanded Virtual Machine Assist Control Program, Virtual Machine, Expanded Virtual Machine Assist components.

The Virtual Machine Assist and Expanded Virtual Machine Assist components consist of microcode routines that perform the function of certain frequently used virtual machine instruction simulation routines of CP. The Control program Assist component consists of microcode routines that perform certain frequently used general CP routines and functions that are required to support a virtual machine environment,.

The Virtual Interval Timer Assist component simulates a virtual interval timer f or a virtual machine,.

Virtual Machine Assist Component

The Virtual Machine Assist component is entered when one of the following occurs:

• A privileged instruction program exception occurs that is caused when a virtual machine issues an INSERT PSW KEY, INSERT STORAGE KEY, LOAD PSW.t LOAD REAL ADDRESS, RESET REFERENCE BIT, SET PSW KEY FROM ADDRESS, SET STORAGE KEY, SET SYSTEM MASK., STORE CONTROL, STORE 'THEN AND SYSTEM MASK., or STORE THEN OR SYSTEM MASK*instruction.

For most of these instructions, the Virtual Machine Assist component simulates execution of the privileged instruction, and operation of the virtual machine continues with execution of the instruction after the privileged instruction.. CP code is not entered .•

For the instructions identified by an asterisk, certain conditions prevent simulation of the instruction by the Virtual Machine Assist component.. In these cases, control is passed to the Expanded

Virtual Machine Assist component (without entry into CP coding) and simulation of the instruction is attempted again..

Bit 3 in control register 6 determines whether all or only some of the instructions listed above are handled by the Virtual Machine Assist component.. When bit 3 is a zero, all the instructions are handled. This setting would be used when an operating system that operates in EC mode, such as DOS/VS, DOS/VSE, OS/VS, or VM/370, is executing in a virtual machine. When bit 3 is a one, only

instructions that are valid for System/360 as well as System/370 and 4300 Processors (LPSW, ISK, SSK, and SSM) are handled. This setting would be used when an operating system that operates in BC mode, such as OS MFT or MVT or DOS Version 3 or 4, is executing in the virtual machine ...

• An SVC instruction, except SVC 76, is issued by a virtual machine.

PSW switching for the virtual machine is simulated

the Virtual Machine Assist component.. Handling of SVC instructions other than SVC 76 by the virtual Machine Assist component can be disabled by turning on bit 4 in control register 6.

• A page translation program exception occurs in a virtual machine in which a virtual storage operating system is executing. The Virtual Machine ASsist component updates the appropriate shadow page table, if possible.. Handling of page translation exceptions by the Virtual Machine Assist component must be enabled by turning on bit 5 in control register 6.

Expanded virtual Machine Assist component

The Expanded Virtual Machine Assist component is designed to perform some or all of the CP simulation required for the following privileged instructions when they are issued,by a virtual machine:

• LPSW - Load PSW

• SCKC - Set Clock Comparator

• SIO - Start I/O and Start I/O Fast Release

• SPT - Set CPU Timer

• SSM - Set System Mask

• STNSM - Store Then And System Mask

• STOSM - Store Then Or System Mask

• PTLB - purge Translation Lookaside Buffer

• STPT - Store CPU Timer

• TCH - Test Channel

• DIAGNOSE

When an LPSW, SSM, STNSM, or STOSM instruction is issued by a virtual machine, the Virtual Machine Assist component is entered first to

determine whether it can simulate the instruction. When the Virtual Machine Assist component can perform the simulation, the Expanded Virtual Machine Assist component is not invoked. When certain

conditions exist, the Virtual Machine Assist component cannot perform the simulation and control is passed to the Expanded Virtual Machine ASsist component, which makes further tests to determine whether i t can simulate the instruction. The Expanded Virtual Machine Assist component handles certain conditions that are not handled by the Virtual Machine Assist component.. If the Expanded Virtual Machine Assist component cannot perform the simulation, the appropriate CP simulation routine is entered via an interruption (a privileged operation exception occurs).

For PTLB, STPT, and TCH instructions, the Expanded Virtual Machine Assist component completely simulates the instruction and no entry into CP is made. For all the other instructions listed above, simulation by the Expanded Virtual Machine Assist component is only partial and a certain amount of CP code is also executed to perform the simulation.

Note that-while the Control program Assist and the Virtual Machine Assist components execute independently from the other components of the VM/370 hardware assist function, the Expanded Virtual Machine Assist component uses portions of the Control program Assist component in its

Note that-while the Control program Assist and the Virtual Machine Assist components execute independently from the other components of the VM/370 hardware assist function, the Expanded Virtual Machine Assist component uses portions of the Control program Assist component in its

Dans le document A Guide to the IBM 4331 Processor (Page 181-200)

Documents relatifs