Virtual Machine

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pskyboy

Virtual Machine

Post by pskyboy »

Hey Guys

This is a bit off topic but i was just wondering if anyone new any good links to theory of Virtual Machines. I was mostly hoping for information on High Performance or High Level Virtual Machines. I have been searching and have had little luck most brings up info on the JVM. Which is alright but im looking for more complicated theory of how to make higher performance VM's.

Cheers
Peter
Just me!!!

Re:Virtual Machine

Post by Just me!!! »

Try having a look at microsofts site.
I think some sortof source code for there .Net framework
has been released, and I believe at the heart of it is a VM.
Schol-R-LEA

Re:Virtual Machine

Post by Schol-R-LEA »

At the risk of going on a tangent, here, I should like to point out that the phrase 'virtual machine' is overloaded, covering two very different ideas.

The first, and more common, maing is that of a CPU simulator, esp. one which simulates an idealized processor optimized as a target for a particular high-level language's compiler. Unlike most real CPUs, which tend to have relatively low-level operations which work primarily on registers, virtual machines tend to have operations that reflect the high-level operations of the language they target, and rarely have registers (since the 'register's are usually implemented in regular memory, they give no speed advantage); they often are stack-based, an apporach which has advantages esp. in procedural, block-oriented languages. Generally speaking, the more that a VM can 'package' common operations as single instructions, the faster it will run, as fewer instructions means less interpreter overhead. VMs often provide specialized support for abstract constructs, as well, such as the garbage-collection support in JVM.

The other type of Virtual Machine is a hardware virtualizer, a sort of meta-operating system that abstracts and multiplexes the entire computer's hardware, so that multiple OSes (or copies of an OS) can run simultaneously, each copy being unaware of the others and thinking it has control of the entire machine. Ironically, a VMOS of this type is structurally similar to an exo-kernel OS, despite the fact that they have antithetical purposes. The canonical example of a virtualizing OS is VM/370, an IBM mainframe system form the 1970s that remains in uses today; it can run several CMS, OS/360, and AIX sessions independently with little lost in speed. The most common virtualizer on PC hardware is VMware; an open source equivalent, plex86, is currently under development.

I am assuming that you mean the former type, and that you want to design one for a particular language, is that correct? I can't help you too much with theory, except in generalities, but if you explain your intended design I might be able to give some advice.
pskyboy

Re:Virtual Machine

Post by pskyboy »

Yep the first one is what i am trying to achieve and it is for a specific langauge. I was going to implement a stack based approach unless i can find a better way of doing it. Im not to bothered about the speed im more worried about portability so i want something as high level as i can make it. When i was reading a book on the Java VM it had a web page which was ment to show a much better way of doing a VM for higher level languages but the link is dead. I was mostly trying to get theory liek this on different ways to implement VM's

Peter
Post Reply