[virtmach] Definition a virtual machine ?

Dwight Hughes dwighth@ipa.net
Tue, 16 Nov 1999 12:23:57 -0600

In the case of the original Smalltalk virtual machines on general
hardware (and for the Symbolics Genera VLM (Virtual Lisp Machine) on the
Alpha), you are talking about *literal* virtual machines. By this I mean
that the virtual machines implemented on the general hardware are
actually emulators for the original microcoded hardware (or at least the
core of them is - in both cases the original systems had portions of the
hardware abstraction layer in microcode and other portions in low-level
software written on top of this to create the true higher-level
interface to the "machine"). Smalltalks based on the original Xerox PARC
systems (VisualWorks and Squeak) can actually be considered guest OSs
when running on other systems, and moving them back to run on bare
hardware is not a big task (especially for Squeak).

Having a single simple definition of what a "virtual machine" is rather
like having a single definition of what "compiling" is. There are lots
of shades of gray. But I'll give it a shot. :-)

My personal view is that a "true" virtual machine should be *complete*
-- you should be able to, at least in theory, create a physical machine
from the VM specs and run your code directly on it. So I would agree
that an instruction set of some sort is a defining part of a VM -- a VM
without an instruction set is really a runtime support library. How the
instruction set is coded or represented has no bearing on whether
something is a VM or not. Whether the VM directly interprets the
instruction set or translates it all to native code for execution or
does something in between has no bearing either. 

I would also expect a VM to present some sort of virtual "physical"
model of its execution process (stacks, registers, accumulators,
whatever), but that is in a bit grayer area.

I would not consider microkernels or APIs in general to be VMs (though
VMs can certainly contain them) -- they are abstractions of certain
hardware and/or OS resources, but are not in themselves "complete". You
must rely on the hardware CPU or an interpreter or VM to actually run
your code to use them.

-- Dwight

Laurent Martelli wrote:
> >>>>> "James" == James Powell <james@advancedsw.com> writes:
>   James> John Morrison writes:
>   >> Hi All;
>   >>
>   >> The Short Version:
>   >>
>   >> Can anybody point me at information, specifications, or
>   >> implementations for virtual machines that enable OS-level
>   >> programs to be written/run?
>   James> I think that the Mach microkernel at least partially solves
>   James> this problem.
>   James> It isn't really a virtual machine as Mach has no instruction
>   James> set, only a C API.
> How would you define a virtual machine ?
> I'd say that any API can be considered a virtual machine. Having
> byte-coded instructions is just an implementation issue of the VM
> after all.
> --
> Laurent Martelli
> martelli@iie.cnam.fr