• Aucun résultat trouvé

VIRTUAL MACHINES

Dans le document .A Guide to the I B M 4341 Processor (Page 169-200)

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

assumed,.

The virtual machine concept is ~ logicalextension'of the virtual storage ,concept and requires support of multiple virtual storages,.

Therefore, VM/370 can execute only with System/37 0 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 CoIilmunications Subsystem (RSCS),and Interactive 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 it 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 4300 Processor or 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, 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 i t performs are handled by an operating system rather than by CP. That is, each vi~tual machine lias an operating system executing in i t that

allocates inachine res,ources 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 operatorl,s console.

The 'virtual operator'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 operator's console, CP receives, control and performs the

required, functions.. '

Communication between the user and the op.erating 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'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

~stem/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 4341 Processor)

• APL 360-DOS

• OS PCP, MFT, or MVT

• OS ASP Version 3

• OS/VSl

• OS/VS2 SVS (Releases 1, 1.6, and 1 .• 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 ina virtual machine in a VM/370 environment. Figure 18.05 .. 1 conceptually. illustrates the real and virtual machine environment that is supported by VM/370.

Virtual I/O units

operator's console User 1 Virtual machine 1

User 1

Card punch(es)

Card Reader(s)

Other 1/0 device types

Figure 18,.05.1.

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 mach ine 3

Real Machine

User 2 User 3

Real mach ine

Direct Direct Direct

access access access

storage storage storage

Virtual I/O units

operator's console' User N Virtual machine N

User N

Other 1/0 device types

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

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

r 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 certain limitations,

different from that of the real machine in terms of these speci fica tions .•

Virtual Instructi:on processing Function Simulation

CP is resident in processor storage during operation of the real macbine.. 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 aQdition, 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 ope'rating virtual machines on a time-shared basis to sj.mulate th~ existence of multiple processors. A virtual machine can. execute any instruction'for the 4341 Processor

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 whe,n ECPS:VSE mode is in effect. In addition, the DIAGNOSE

·instruction is reserved 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 feat"ures 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 ECand OAT modes specified, depending on the mode

requi~ed by the operating system executing in it. However, EC and OAT 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 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 virtual storage size for the 4341 processor. The existence of virtual storage for a virtual machine is simulated by CP using OAT hardware and

external page storage, as for a virtual storage environment that is supported in System/370 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,.05.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 control and problem programs that are executing in the virtual machines.

In this manner, CP provides one virtual storage for each virtual machine, and processor storage in the real machine is shared by concurrently operating virtual machines,.

The virtual storage defined for a virtual machine always appears to 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.

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 riot necessarily have to be a one-to-one correspondence. In addition, the I/O device addresses

assigned to virtual I/O devices need not be the same 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

several virtual direct access devices of the same type and thus provides more efficient use of available direct access storage.

Virtual I/O devices are always simulated on a real I/O device of the same device 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 minidisk facility.) The local spooling capability of CP provides data transcription between unit record devices and direct access storage devices and is functionally similar to DOS and DOS/VS POWER, DOS/VS POWER/VS, VSE/POWER, OS readers and writers, OS HASP, and OS/VS JES,. 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 system (physical record processing, logical record processing, and error recovery routipes) 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 real machine. When a START I/O

instruction 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 real cylinder addresses, as required. CP also performs the necessary channel program translation and page-locking operations and queues the I/O request if i t 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 and causes an I/O interruption, CP receives processor control, gathers I/O status information, and attempts to restart the available real I/O components,. CP presents the status data to the operating system control program via a simulated I/O interruption for the virtual machine in which the operating system is executing.

CP completely controls operation of the real I/O devices that are required for its own execution, such as paging and spooling devices.

This includes determining the need for I/O operations, scheduling and initiating I/O requests, handling I/O interruption processing, and performing error recovery procedures .•

ECPS:VM/370

General Description

ECPS:VM/310, a portion of the standard Extended Control Program Support feature for the 4341 Processor, is designed to improve VM/370 performance by providing for the execution of certain CP routines and functions in hardware to reduce the amount of processor time used by CP.

A reduction of up to 84 percent of processor busy time for the VM/310 CP has been measured when compared to the same version of VM/310 running wi thout

.cps:

VM/310 enabled,.

The hardware assist is provided for the following functional areas:

• Virtual machine and control block dispatching

• I/O handling and CCw translation

• Virtual interval timer simulation

• privileged instruction simulation

• SVC handling

• Page management functions

• storage management functions

ECPS:VM/370 as implemented in the 4341 Processor is like the VM/370 hardware assist function for System/370 Models 135 Model 3, 138, 145 Model 3, and 148,. Thus, ECPS:VM/310 for the 4341 Processor includes as one of its components the Virtual Machine Assist feature that is

available for the 3031 Processor and Models 135 (Model 0),145 (Models 0 and 2), and 158 (and as an RPQ for Models 165 II and 168 and the 3032 and 3033 Processors)·.

ECPS:VM/370 consists of the Virtual Machine Assist, Control Program Assist, Expanded Virtual Machine Assist, and Virtual Interval Timer 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 for a virtual machine.

Either ECPS:VM/370 or ECPS:VSl can be activated in a 4341 Processor during IML when System/310 mode is in effect. However, the actual operation of the four components of ECPS:VM/310 is enabled and disabled using three bits (0, 6, and 1) in control register 6. The Virtual Machine Assist component can be enabled separately from the other components,. Other bits in control register 6 enable and disable specific functions within the Virtual Machine and Expanded Virtual Machine Assist components .•

. ,

, ....

Shown below are the settings for control register 6 bits 0, 6, and 7 and the assis't components tl,ley enable.

Control Register 6 Assist ComEQnent Enabled

Bit 0 Bit 6 Bit 7

0 0 0 None .• (This is the processor

reset setting .• )

.~;

0 1 0 , Control program Assist only

1 0 0 Virtual Machine Assist only

1 0 1 Virtual Machine ·Assist and

Virtual Interval Timer Assist

1 1 0 Control Program, Virtual Machine,

and Expanded Virtual Machine Assists

1 1 1 COntrol Program, Virtual Machine,

Expanded Virtual Machine, and Virtual Interval Timer Assists 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*, 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 1nstruction 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 and System/370 as well as 4300 Proces.sors (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 b¥ 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 Macpine Assist component updates the appropriate shadow page table, if possible. Handling of page translation exceptions by the Virtual

• A page translation program exception occurs in a virtual machine in which a virtual storage operating system is executing,. The Virtual Macpine Assist component updates the appropriate shadow page table, if possible. Handling of page translation exceptions by the Virtual

Dans le document .A Guide to the I B M 4341 Processor (Page 169-200)

Documents relatifs