Re: Do we really need virtual machines?

Dobes Vandermeer <dobes@dobesland.com>
2 Oct 2004 16:18:30 -0400

          From comp.compilers

Related articles
Do we really need virtual machines? Nicola.Musatti@ObjectWay.it (2004-10-02)
Re: Do we really need virtual machines? samiam@moorecad.com (Scott Moore) (2004-10-02)
Re: Do we really need virtual machines? dobes@dobesland.com (Dobes Vandermeer) (2004-10-02)
Re: Do we really need virtual machines? Juergen.Kahrs@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2004-10-02)
Re: Do we really need virtual machines? basile-news@starynkevitch.net (Basile Starynkevitch \[news\]) (2004-10-04)
Re: Do we really need virtual machines? joanpujol@gmail.com (Joan Pujol) (2004-10-04)
Re: Do we really need virtual machines? samiam@moorecad.com (Scott Moore) (2004-10-04)
Re: Do we really need virtual machines? slimick@venango.upb.pitt.edu (John Slimick) (2004-10-04)
Re: Do we really need virtual machines? nmm1@cus.cam.ac.uk (2004-10-09)
[11 later articles]
| List of all articles for this month |
From: Dobes Vandermeer <dobes@dobesland.com>
Newsgroups: comp.compilers
Date: 2 Oct 2004 16:18:30 -0400
Organization: dobesland.com
References: 04-10-013
Keywords: VM, performance
Posted-Date: 02 Oct 2004 16:18:30 EDT

On 2 Oct 2004 01:17:26 -0400, Nicola Musatti <Nicola.Musatti@ObjectWay.it>
wrote:


> Hallo,
> According to their proponents virtual machines such as JVM and CLR are
> the solution to all our (programming) problems, of which portability
> is but one.


Well I hope they aren't saying it will solve my performance problems -
because I'd have a hard time believing that!


> Maybe it's just because when I learnt programming the p-machine was
> considered an interesting oddity, but with the exception of code
> that really must run unchanged on unknown platforms, I fail to see
> what do I gain from a virtual machine that I don't already get from
> a good old compiler/runtime support/standard library chain.


If you view a virtual machine as just a well-defined platform
targetted by compilers, then it seems there is nothing you can do for
a virtual machine that cannot be done for some other platform. A VM
is practically synonymous with an emulator except that VM code is
designed to be emulated.


> After all, isn't gcc the most ported virtual machine of all?


I think it's not a virtual machine; when the program is running, gcc
is no longer running.


> Now, this being the compiler forum, I'm interested in learning about
> the advantages of virtual machines from the compiler writer
> perspective.


Because you get to design the instruction set, you can make it more
"friendly" to the compiler writers.


In the case of the JVM or SafeTSA you can make it simple to perform a
safety validation; safety proofs for other machine codes are far more
difficult.


But then again, most of the VM's benefit is portability - it is usually
easier to write an interpreter for virtual machine code than for, say,
intel x86 machine code.


CU
Dobes


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.