VM (operating system)
VM, often written VM/CMS, is a family of virtual machine operating systems used on IBM mainframes including the System/370, System/390, IBM Z and compatible systems. It replaced the older CP-67 that formed the basis of the CP/CMS operating system. It was first released as the free Virtual Machine Facility/370 for the S/370 in 1972, followed by chargeable upgrades and versions that added support for new hardware.
VM creates virtual machines into which a conventional operating system may be loaded to allow user programs to run. Originally, that operating system was CMS, a simple single-user system similar to DOS. VM can also be used with a number of other IBM operating systems, including large systems like MVS or VSE, which are often run on their own without VM. In other cases, VM is used with a more specialized operating system or even programs that provided many OS features. These include RSCS and MUMPS, among others.
Design
The heart of the VM architecture is the Control Program or hypervisor abbreviated CP, VM-CP and sometimes, ambiguously, VM. It runs on the physical hardware, and creates the virtual machine environment. VM-CP provides full virtualization of the physical machine – including all I/O and other privileged operations. It performs the system's resource-sharing, including device management, dispatching, virtual storage management, and other traditional operating system tasks. Each VM user is provided with a separate virtual machine having its own address space, virtual devices, etc., and which is capable of running any software that could be run on a stand-alone machine. A given VM mainframe typically runs hundreds or thousands of virtual machine instances. VM-CP began life as CP-370, a reimplementation of CP-67, itself a reimplementation of CP-40.Running within each virtual machine is another operating system, a guest operating system. This might be:
- CMS. Most virtual machines run CMS, a lightweight, single-user operating system. Its interactive environment is comparable to that of a single-user PC, including a file system, programming services, device access, and command-line processing.
- GCS, which provides a limited simulation of the MVS API. IBM originally provided GCS in order to run VTAM without a service OS/VS1 virtual machine and VTAM Communications Network Application. RSCS V2 also ran under GCS.
- A mainstream operating system. IBM's mainstream operating systems can be loaded and run without modification. The VM hypervisor treats guest operating systems as application programs with exceptional privileges – it prevents them from directly using privileged instructions, but simulates privileged instructions on their behalf. Most mainframe operating systems terminate a normal application which tries to usurp the operating system's privileges. The VM hypervisor can simulate several types of console terminals for the guest operating system, such as the hardcopy line-mode 3215, the graphical 3270 family, and the integrated console on newer System/390 and IBM Z machines. Other users can then access running virtual machines using the DIAL command at the logon screen, which will connect their terminal to the first available emulated 3270 device, or the first available 2703 device if the user is DIALing from a typewriter terminal.
- Another copy of VM. A second level instance of VM can be fully virtualized inside a virtual machine. This is how VM development and testing is done. This technique was used to develop S/370 software before S/370 hardware was available, and it has continued to play a role in new hardware development at IBM. The literature cites practical examples of virtualization five levels deep. Levels of VM below the top are also treated as applications but with exceptional privileges.
- A copy of the mainframe version of AIX or Linux. In the mainframe environment, these operating systems often run under VM, and are handled like other guest operating systems. There was also the short-lived IX/370, as well as S/370 and S/390 versions of AIX.
- A specialized VM subsystem. Several non-CMS systems run within VM-CP virtual machines, providing services to CMS users such as spooling, interprocess communications, specialized device support, and networking. They operate behind the scenes, extending the services available to CMS without adding to the VM-CP control program. By running in separate virtual machines, they receive the same security and reliability protections as other VM users. Examples include:
- * RSCS – communication and information transfer facilities between virtual machines and other systems
- * RACF — a security system
- * Shared File System, which organizes shared files in a directory tree
- * VTAM – a facility that provides support for a Systems Network Architecture network
- * PVM – a facility that provides remote access to other VM systems
- * TCPIP, SMTP, FTPSERVE, PORTMAP, VMNFS – a set of service machines that provide TCP/IP networking to VM/CMS
- * Db2 Server for VM – a SQL database system, the servers are often named similarly to "SQLMACH" and "SQLMSTR"
- * DIRMAINT – A simplified user directory management system.
- * MUMPS/VM — an implementation of the MUMPS database and programming language which could run as guest on VM/370. MUMPS/VM was introduced in 1987 and discontinued in 1991.
- A user-written or modified operating system, such as National CSS's CSS or Boston University's VPS/VM.
Versions
; Virtual Machine Facility/370:VM/370, released in 1972, is a System/370 reimplementation of earlier CP/CMS operating system.
; VM/370 Basic System Extensions Program Product:VM/BSE is an enhancement to VM/370 that adds support for more devices, improvements to the CMS environment, and some stability enhancements to CP.
; VM/370 System Extensions Program Product:VM/SE is an enhancement to VM/370 that includes the facilities of VM/BSE, as well as a few additional fixes and features.
; Virtual Machine/System Product:VM/SP, a milestone version, replaces VM/370, VM/BSE and VM/SE. Release 1 added EXEC2 and XEDIT System Product Editor; Release 3 added REXX; Release 6 added the shared filesystem.
; Virtual Machine/System Product High Performance Option:VM/SP HPO adds additional device support and functionality to VM/SP, and allows certain S/370 machines that can utilize more than 16 MB of real storage to do so, up to 64 MB. This version was intended for users that would be running multiple S/370 guests at once.
; Virtual Machine/Extended Architecture Migration Aid: VM/XA MA is intended to ease the migration from MVS/370 to MVS/XA by allowing both to run concurrently on the same processor complex.
; Virtual Machine/Extended Architecture System Facility: VM/XA SF is an upgraded VM/XA MA with improved functionality and performance.
; Virtual Machine/Extended Architecture System Product: VM/XA SP is an upgraded VM/XA SF with improved functionality and performance, offered as a replacement for VM/SP HPO on machines supporting S/370-XA. It includes a version of CMS that can run in either S/370 or S/370-XA mode.
; Virtual Machine/Enterprise Systems Architecture:VM/ESA provides the facilities of VM/SP, VM/SP HPO and VM/XA SP. VM/ESA version 1 can run in S/370, ESA/370 or ESA/390 mode; it does not support S/370 XA mode. Version 2 only runs in ESA/390 mode. The S/370-capable versions of VM/ESA were actually their own separate version from the ESA/390 versions of VM/ESA, as the S/370 versions are based on the older VM/SP HPO codebase, and the ESA/390 versions are based on the newer VM/XA codebase.
; z/VM:z/VM, the last version still widely used as one of the main full virtualization solutions for the mainframe market. z/VM 4.4 was the last version that could run in ESA/390 mode; subsequent versions only run in z/Architecture mode.
The CMS in the name refers to the Conversational Monitor System, a component of the product that is a single-user operating system that runs in a virtual machine and provides conversational time-sharing in VM.
Hypervisor interface
IBM coined the term hypervisor for the 360/65 and later used it for the DIAG handler of CP-67.The Diagnose instruction is a privileged instruction originally intended by IBM to perform "built-in diagnostic functions, or other model-dependent functions." IBM repurposed DIAG for "communication between a virtual machine and CP." The instruction contains two four-bit register numbers, called Rx and Ry, which can "contain operand storage addresses or return codes passed to the DIAGNOSE interface," and a two-byte code "that CP uses to determine what DIAGNOSE function to perform." The available diagnose functions include:
| Hexadecimal code | Function |
| 0000 | Store Extended-Identification Code |
| 0004 | Examine Real Storage |
| 0008 | Virtual Console Function—Execute a CP command |
| 0018 | Standard DASD I/O |
| 0020 | General I/O—Execute any valid CCW chain on a tape or disk device |
| 003C | Update the VM/370 directory |
| 0058 | 3270 Virtual Console Interface—perform full-screen I/O on an IBM 3270 terminal |
| 0060 | Determine Virtual Machine Storage Size |
| 0068 | Virtual Machine Communication Facility |
At one time, CMS was capable of running on a bare machine, as a true operating system. It now runs only as a guest OS under VM. This is because CMS relies on a hypervisor interface to VM-CP, to perform file system operations and request other VM services. This paravirtualization interface:
- Provides a fast path to VM-CP, to avoid the overhead of full simulation.
- Was first developed as a performance improvement for CP/CMS release 2.1, an important early milestone in CP's efficiency.
- Uses a non-virtualized, model-dependent machine instruction as a signal between CMS and CP: DIAG.