Dis: The Inferno Virtual Machine
Inferno is a virtual-machine-based development environment akin to Java. Inferno’s virtual machine (VM) is called Dis. The programming language, called Limbo, has a C-like syntax.
Inferno is a conpact system designed for distributed environments. Its Styx protocol (see "Inferno Operating System Burns Its Way Into Embeded Systems," Electronic Design, Aug. 7, 2000, p. 26) is used to link applications together. Connections are secure channels, and the naming system uses a hierarchical directory structure.
Inferno can run on other operating systems, like Windows, Solaris, and Linux, or it can operate as its own multithreaded operating system. The overall system design is compact, making it useful even in low-end embedded applications. The Dis VM supports only the Limbo language, although it could, in theory, support any compiler that generates Dis bytecodes. The VM has been implemented on a wide range of processors, from x86 to the MIPS architecture. It is even available as a browser plug-in similar to the Java Web-based plug-in for running client-side applets.
Dis has many similarieties to a Java VM. It supports garbage collection, and JIT and interpreter versions have been implemented. The Dis architecture makes native-code compilation easier. It uses a memory transfer machine (MTM) virtual machine instead of the more conventional stack-oriented architecture. The MTM architecture uses instructions such as:
Add a,b,c # c = a + b
push a push b add store c
An MTM-style intermediate code is often used inside other compilers, and this code is then translated into the stack-oriented bytecodes. Dis eliminates this translation, resulting in a fast and efficient compiler for the VM.
The standard Dis garbage-collection scheme uses reference counting. This has the advantage of reclaiming memory as soon as it is unused, but it cannot collect circular structures. This can lead to memory leaks but not the use of invalid pointers. It is possible to implement Dis using a more conventional garbage collector like those found in most Java VMs but with the higher complexity and larger garbage-collection code size these implementations require. www.vitanuova.com