Re: fast os switching...



In article <4499b171@xxxxxxxxxxxxxxx>,
Rich Gibbs <richg74@xxxxxxxxxxxxxxxxxxx> wrote:
delfick said the following, on 06/21/06 07:36:
thnx for the quick replies :D:D

well i'm cheap so i'm only interested in free software, ruling out the
VmWare ESX u suggested

Also, i thought that u can't run games very well or fast with vmware
and Xen (as that is pretty much the only reason i use windows nowadays,
Ubuntu and Xgl are so cool :D) or am i wrong?



Another poster elsewhere in this thread has mentioned the IBM z/VM
mainframe OS. If you're looking for something you can use directly,
it's obviously not likely to be useful. However, if you're interested
in the concepts and theory of the thing, it's worth looking at.
(Incidentally, IBM has had a VM operating system since at least the late
1970s!)

That was me, and yes, I also know about it from having been a happy
user at a long-ago place of employment.

z/VM and its predecessors are interesting because of the way that the
hardware and software facilities are used. The IBM mainframe
architecture, beginning with System/370, has virtual memory hardware.
The processor can execute in either "supervisor state", in which all
instructions are legal; or in "problem state", meant for applications,
in which "privileged" instructions that directly touch the hardware
(e.g., Start I/O, Set System Mask, Load PSW) are illegal. (This was true
in System/360, too.)

VM works by creating a virtual machine that runs in problem state,
although CP [Control Program, the virtual machine monitor] tells its
operating system that it is running in supervisor state. When the
virtual machine tries to execute a privileged instruction, it causes a
hardware interrupt. This is handles by CP, which simulates the
instruction if the virtual machine thinks it is in supervisor state. If
the virtual machine thinks it is in problem state, CP reflects a
privileged operation exception to it, just as the real hardware would do.

Nice description, and consistent with how I understand the system to
work, more or less reasoning from first principles (or something along
those lines).

However, it seems like there would be a fair amount of overhead
if all privileged instructions executed by "guest" O/S's (the ones
running "under" CP) generated interrupts. I'm not clear on details,
but I believe there were/are hardware features that allow some of
this overhead to be bypassed. Googling for "hardware assist" and
some form of the operating system's name (VM/CP, VM/370, z/VM) ought
to turn up useful references, for anyone who wants to pursue it.
A lot of the ones I found seem to be from the extensive archives of
one of the regular posters in alt.folklore.computers, Lynn Wheeler.
Lots of good stuff there, if sometimes a little hard to follow.

The VM system also uses one specific privileged instruction, DIAGnose,
which is used to allow the virtual machine to communicate with CP. As
its name suggests, DIAG is otherwise only intended for running
diagnostics on real hardware, and can never legitimately appear in
systems or applications programs.

I used VM systems quite a bit from the late 1970s through the late
1980s. They were always very reliable and robust; and, for a systems
programmer, the possibility of testing new stuff during civilised hours
was definitely a plus. ;-)

Sing it, brother! that was exactly the appeal to me as well, in
about the same time frame -- well, that and the fact that if your
new stuff didn't work, there were more debugging facilities under
VM than on real hardware. But running MVS (large mainframe O/S
of the era, for those who don't know this environment) with TSO
("time-sharing option" -- support for interactive users) under VM
on a heavily-loaded system .... Not fast. Very much "not fast".

--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
.



Relevant Pages

  • Re: fast os switching...
    ... The IBM mainframe architecture, beginning with System/370, has virtual memory hardware. ... VM works by creating a virtual machine that runs in problem state, although CP tells its operating system that it is running in supervisor state. ... which simulates the instruction if the virtual machine thinks it is in supervisor state. ...
    (comp.os.linux.misc)
  • Re: Need for packed decimal was Re: The quibble over nibbles (was Re: MVS Packed Decimal with no sig
    ... the Burroughs Medium System and its descendants *did* have decimal ... Also, on the Burroughs B1000, the RPG and COBOL virtual machine interpreters ... I can't speak to other vendors' hardware, but I can say that my personal ... instructions, one technique the hardware designers can use is to examine the ...
    (comp.lang.cobol)
  • Re: What is the benefit to me of .NET as an end-user?
    ... by the virtual machine. ... If you are going to consider that all things are the same because they run on the same hardware, there is no point asking about virtual machines at all. ... I load that app into the emulator ... The emulator **does not** compile or otherwise convert the Motorola instructions into Intel instructions. ...
    (borland.public.delphi.non-technical)
  • Re: Python vs. Lisp -- please explain
    ... Yet one could potentially have that bytecode interpreter in hardware. ... introducing the nature of the machine: how complicated the instructions ... The CPython virtual machine consists of "complicated" ...
    (comp.lang.python)
  • Re: ANSI C question about volatile
    ... The *intent* of the C Standard is clear: the hardware has some ... Only one "bus width" is supported, ... the register numbers might change in the process). ... programmer might use the "bis" or "bic" instructions on the VAX: ...
    (comp.lang.c)