Virtual Mach

download Virtual Mach

of 6

Transcript of Virtual Mach

  • 8/4/2019 Virtual Mach

    1/6

    Virtual Machines

    Conceptually, a computer system is made up of

    layers. The hardware is the

    lowest level in all such systems. The kernel runningat the next level uses the

    hardware instructions to create a set of system calls

    for use by outer layers. The

    system programs above the kernel are therefore able

    to use either system calls

    or hardware instructions, and in some ways these

    programs do not differentiate

    between these two. Thus, although they are

    accessed differently, they both

    provide functionality that the program can use to

    create even more advanced

    functions. System programs, in turn, treat the

    hardware and the system calls as

    though they were both at the same level.

    Some systems carry this scheme a step further by

    allowing the system

    programs to be called easily by the application

    programs. As before, although

    the system programs are at a level higher than that

    of the other routines, theapplication programs may view everything under

    them in the hierarchy as

    though the latter were part of the machine itself.

    This layered approach is

  • 8/4/2019 Virtual Mach

    2/6

    taken to its logical conclusion in the concept of a

    virtual machine. The VM

    operating system for IBM systems is the best

    example of the virtual-machineconcept, because IBM pioneered the work in this

    area.

    By using CPU scheduling (Chapter 6) and virtual-

    memory techniques

    (Chapter lo), an operating system can create the

    illusion that a process has its

    own processor with its own (virtual) memory. Of

    course, normally, the process

    has additional features, such as system calls and a

    file system, that are not provided

    by the bare hardware. The virtual-machine approach,

    on the other hand,

    does not provide any additional functionality, but

    rather provides an interface

    that is identical to the underlying bare hardware.

    Each process is provided with

    a (virtual) copy of the underlying computer (Figure

    3.11).

    The physical computer shares resources to create

    the virtual machines. CPUscheduling can share out the CPU to create the

    appearance that users have their

    own processors. Spooling and a file system can

    provide virtual card readers and

  • 8/4/2019 Virtual Mach

    3/6

    virtual line printers. A normal user time-sharing

    terminal provides the function

    of the virtual-machine operator's console.

  • 8/4/2019 Virtual Mach

    4/6

  • 8/4/2019 Virtual Mach

    5/6

    A major difficulty with the virtual-machine approach

    involves disk sys- I

    tems. Suppose that the physical machine has three

    disk drives but wants to

    support seven virtual machines. Clearly, it cannot

    allocate a disk drive to each 1 virtual machine.Remember that the virtual-machine software itself

    will need

    substantial disk space to provide virtual memory.

    The solution is to provide I

    I

    virtual disks, which are identical in all respects

    except size-termed minidisks

    in IBM's VM operating system. The system

    implements each minidisk by allo- I

    cating as many tracks on the physical disks as the

    minidisk needs. Obviously,

    the sum of the sizes of all minidisks must be smaller

    than the size of the physical

    disk space available.

    Users thus are given their own virtual machines.

    They can then run any of

  • 8/4/2019 Virtual Mach

    6/6

    the operating systems or software packages that are

    available on the underlying

    machine. For the IBM VM system, a user normally

    runs CMS-a single-userinteractive operating system. The virtual-machine

    software is concerned with

    multiprogramming multiple virtual machines onto a

    physical machine, but

    it does not need to consider any user-support

    software. This arrangement

    may provide a useful partitioning into two smaller

    pieces of the problem of

    designing a multiuser interactive system.