CS550-1 - JMU



CS550-1

(Fall 2003)

IBM’ s VM

Operating System

By

Aniruddha Marathe

Abstract

This paper describes the IBM's VM operating system, which offers a virtual machine to each user process. The difference between IBM's VM system and the vast majority of its competitors is that the virtual machine VM offers to a user process has identical semantics to the machine on which VM runs, except, of course, that it is a bit slower and has fewer resources. In order to offer this, VM relies on a memory management unit in order to virtualize memory, and it relies on the fact that a program's access to non-memory resources outside the CPU is through privileged instructions, such that attempts to use these in user mode cause a trap.

Table of contents

|Topic |Page Number |

|1. Introduction to VM |4 |

| | |

|2. VM & Linux |5 |

| | |

|3. Process Management |6 |

|3.1 Process Model |6 |

|3.2 Virtual Time |6 |

|3.3 Virtual Memory |6 |

|3.4 Process Creation |6 |

|3.5 Process Termination |6 |

|3.6 Process States and Transitions |7 |

|3.7 Threads |7 |

|3.7.1 The Thread Model |7 |

|3.7.2 Thread Usage |7 |

| | |

|4. Virtual Machine Monitor (VMM) |8 |

| | |

|5. Advantages and Disadvantages of VM |9 |

| | |

|6. Java Virtual Machine (JVM) |9 |

| | |

|7. Backups and Cache |9 |

| | |

|8. Questions |10 |

| | |

|Bibliography |11 |

1. What is Virtual machine?

VM (Virtual Machine) has long been recognized as a robust computing platform, spanning the entire family of S/390 and zSeries servers.

The infrastructure for e-business on demand TM environments can be deployed with visionary technology on z/VM, including advanced virtualization, support for Open Source software, and autonomic computing enhancements. With virtualization technology as its foundation, z/VM continues to provide new function and technology exploitation on the mainframe that enables you to virtualize processor, communication, memory, storage, I/O and networking resources, with the potential to help reduce the need to plan for, purchase, and install hardware to support new workloads.

VM is a modern time-sharing system running around the world. It is based on the concept of Virtual Machines; each VM user works in an environment, which simulates (hence the term 'virtual'), and provides the full power of, a System/390 CPU (hence the term 'machine'). VM users also have powerful advanced software development tools available, such as the ReXX scripting language, the CMS Pipes facility, and the DB2/VM database system

The VM operating system (also called a ``hypervisor'', like a supervisor on steroids) was designed from the start to do exactly that; in essence, under VM, each user gets his or her own copy of the machine. It looks exactly like a System/390, complete with attached peripherals, and the user owns (effectively, is root on) that virtual machine. Behind the scenes, of course, the peripherals are simulated and are managed by VM, and the hardware is designed with virtualization assistance features, which VM exploits. VM can also simply present an actual physical device, if appropriate to your needs.

2. VM & Linux

The latest development in VM is that it now supports Linux. You can now run hundreds of full-function virtual Linux servers on a single properly configuredS/390 or z Series 900.

There is even an entire web site devoted to Linux running under VM!

VM complies with the following industry standards:

Institute of Electrical and Electronics Engineers (IEEE®) Portable Operating System Interface (POSIX®) 1003.1 system interfaces and applicable Federal Information Processing Standard (FIPS 151)

POSIX 1003.2 Shell and Utilities

POSIX 1003.1 C Threading

The Open Software Foundation's(TM) (OSF(TM)) Distributed Computing Environment (DCE(TM)).

Linux/390 presents an interesting migration path for organizations, which are seeking to de-emphasize their mainframes but can't just decommission them, because it provides services simply unavailable in other environments.

Running the Linux operating system as a guest of z/VM or VM/ESA is a smart choice. Consider the following benefits VM offer a Linux guest environment:

➢ Resources can be shared among multiple Linux images running on the same VM system. These resources include: CPU cycles, memory, storage devices, and network adapters.

➢ Server hardware consolidation -- running tens or hundreds of Linux systems on a single zSeries offers customers savings in space and personnel required to manage real hardware.

➢ Virtualization -- the virtual machine environment is highly flexible and adaptable. New Linux guests can be added to a VM system quickly and easily without requiring dedicated resources. This is useful for replicating servers in addition to giving users a highly flexible test environment.

Running Linux on VM means the Linux guest(s) can transparently take advantage of VM support for zSeries hardware architecture and RAS features.

VM/ESA provides high-performance communication among virtual machines running Linux and other operating systems on the same processor. The underlying technologies enabling high-speed TCP/IP connections are virtual channel-to-channel (CTC) adapter support and VM IUCV (Inter-User Communication Vehicle).

Linux on zSeries includes a minidisk device driver that can access all DASD types supported by z/VM and VM/ESA.

Data-in-memory performance boosts are offered by VM exploitation of the z/Architecture.

Debugging -- VM offers a functionally rich debug environment that is particularly valuable for diagnosing problems in the Linux kernel and device drivers.

3. Process management

A process is a program in execution.

▪ We are assuming a multiprogramming OS that can switch from one process to another.

▪ Sometimes this is called pseudoparallelism since one has the illusion of a parallel processor.

▪ The other possibility is real parallelism in which two or more processes are actually running at once because the computer system is a parallel processor, i.e., has more than one processor.

3.1.1 The Process Model

Even though in actuality there are many processes running at once, the OS gives each process the illusion that it is running alone.

3.2 Virtual time: The time used by processes. Virtual time progresses at a rate independent of other processes. But it might be not correct as the virtual time is typically incremented a little during systems calls used for process switching; so if there are more other processors more ``overhead'' virtual time occurs.

3.3 Virtual memory: The memory as viewed by the process. Each process typically believes it has a contiguous chunk of memory starting at location zero. Of course this can't be true of all processes (or they would be using the same memory) and in modern systems it is actually true of no processes (the memory assigned is not contiguous and does not include location zero).

Think of the individual modules that are input to the linker. Each numbers its addresses from zero; the linker eventually translates these relative addresses into absolute addresses. That is the linker provides to the assembler a virtual memory in which addresses start at zero.

Virtual time and virtual memory are examples of abstractions provided by the operating system to the user processes.

3.4 Process Creation

From the users or external viewpoint there are several mechanisms for creating a process.

▪ System initialization, including daemon processes.

▪ Executions of a process creation system call by a running process.

▪ A user request to create a new process.

▪ Initiation of a batch job.

Normally from the system's viewpoint, the second method dominates. Indeed in Unix only one process is created at system initialization (the process is called init); all the others are children of this first process.

.

3.5 Process Termination

Again from the outside there appear to be several termination mechanisms.

Normal exit (voluntary).

Error exit (voluntary).

Fatal error (involuntary).

3.6 Process States and Transitions

Consider a running process P that issues an I/O request

o The process blocks

o At some later point, a disk interrupt occurs and the driver detects that P's request is satisfied

o P is unblocked, i.e. is moved from blocked to ready

o At some later time the operating system looks for a ready job to run and picks P.

A preemptive scheduler has the dotted line preempt;

a non-preemptive scheduler doesn't.

The number of processes changes only for two arcs: create and terminate.

Suspend and resume are medium term scheduling

Done on a longer time scale.

Involves memory management as well.

Sometimes called two level scheduling.

3.7 Threads

The idea is to have separate threads of control (hence the name) running in the same address space. An address space is a memory management concept. For now think of an address space as the memory in which a process runs and the mapping from the virtual addresses (addresses in the program) to the physical addresses (addresses in the machine). Each thread is somewhat like a process (e.g., it is scheduled to run) but contains less state (e.g., the address space belongs to the process in which the thread runs)

3.7.1 The Thread Model

A process contains a number of resources such as address space, open files, accounting information, etc. In addition to these resources, a process has a thread of control, e.g., program counter, register contents, and stack. The idea of threads is to permit multiple threads of control to execute within one process. This is often called multithreading and threads are often called lightweight processes. Because threads in the same process share so much state, switching between them is much less expensive than switching between separate processes.

Individual threads within the same process are not completely independent. For example there is no memory protection between them. This is typically not a security problem as the threads are cooperating and all are from the same user (indeed the same process). However, the shared resources do make debugging harder. For example one thread can easily overwrite data needed by another and if one thread closes a file other threads can't read from it.

Thread Usage

Often, when a process A is blocked (say for I/O) there is still computation that can be done. Another process B can't do this computation since it doesn't have access to the A's memory. But two threads in the same process do share memory so there is no problem.

An important modern example is a multithreaded web server. Each thread is responding to a single WWW connection. While one thread is blocked on I/O, another thread can be processing another WWW connection. A common organization is to have a dispatcher thread that fields requests and then passes this request on to an idle thread.

4. Virtual Machine Monitor (VMM): software that manages the machine’s real resource between VMs

• In typical mainframe, VMM runs on top of h/w in privileged mode, and VMs runs in user mode

• If OS/VM issues a non-privileged instruction, they are passed down directly

• If OS/VM issues a privileged instruction, it will cause a trap or interrupt or exception.

• “Sensitive” instruction: affect other OS/VM, so OS cannot execute them directly. Ex: PushF, PopF, SIDT, SLDT.

• To be “fully” virtualized, all sensitive and privileged instructions must be able to trapped.

• Intel Pentium CPU has 17 sensitive and non-privileged instructions.

5. Advantages and Disadvantages of VM

1. Some advantages of using virtual machines are

• Portability

• Added Secutiry

• Useful for developing O/S and

• Reliability

• System development can be done on the virtual machine, instead of on a physical machine

• A perfect vehicle for operating-systems research and development

2. Disadvantages of VM

• Difficult to implement due to the effort required to provide an exact duplicate to the underlying machine.

• The isolation, however, permits no direct sharing of resources.

• The main disadvantage of this approach is reduced efficiency.

• Provides complete protection of system resources since each virtual machine is isolated from all other virtual machines.

6. Java Virtual Machine (JVM)

Compiled Java programs are platform-neutral bytecodes executed by a Java Virtual Machine (JVM).

JVM consists of

• Class loader

• Class verifier

• Runtime interpreter

Just-In-Time (JIT) compilers increase performance

7. Backups and Cache

Backups cease to be an issue; because VM is managing all the disks for the virtual machines, all their data is backed up with the VM backup. The same with data integrity; for that kind of cash, you get well-implemented hot-swappable RAID, in which the complexity is never even visible to the Linux machines, because they see their disk space just as devices presented to them by VM. Basically, no matter how many virtual machines you have, you have only one actual machine to protect, so the cost of doing so remains constant, rather than scaling with number of machines.

Furthermore, VM has an extremely efficient cache. Frequently accessed disk blocks will be held in the cache and requests never go to the drives at all. This is a huge win if you either share disks among machines, or if you're running a server form.

8. Questions:

Why have init in Unix? That is why not having all processes created via method 2?

Ans: Because without init there would be no running process to create any others

Why not use separate processes, i.e., what is the shared memory?

Ans: The cache of frequently referenced pages.

Bibliography

URL for Internet Sources:

• VM and Linux:

URL: Institute of Electrical and Electronics Engineers (IEEE®)

Open Software Foundation's(TM) (OSF(TM)) Distributed Computing Environment (DCE(TM)).

• General information on VM

URL:

• ACM digital library

URL:





-----------------------

PHYSICAL MACHINE

VMM

Virtual

Machine

O/S

Virtual

Machine

O/S

APPLCATIONS

APPLCATIONS

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download