A Low Level Virtual Machine

Virtualization is an old idea that has been gaining a lot of interest since the emergence of Cloud Computing. Its very popular, because it allows users to run their programs without worrying about the underlying hardware. It is also associated with a lot fun, and mind bending philosophical problems, like the fact that a computer can simulate itself, and the simulated computer can simulate another computer, and then the simulated computer that is being simulated on a simulated computer, can simulate another computer; all without the user being able to tell the difference between a "real" computer, and a simulated one.

Kiana is a small, beautiful computer program that simulates a CPU which performs adding operations. It is capable of loading two numbers into registers, and performing an add operation on them. This functionality is very simple, but the amount of time it took to accomplish this simple task was a lot. I was a bit too ambitious, which caused me to waste a lot of time on dead ends; and also, writing compilers is hard.

I see a future where everyone will be doing their computing on one huge virtual machine, and it seems to be a very exciting future indeed!

PS: If you are interested in this subfield of Computer Science, I suggest you check out LLVM LLVM is a compiler that is used to write compilers. It stands for "Low Level Virtual Machine", because if you use LLVM for your compiler, all you need to worry about is writing the front-end. LLVM handles the rest.

Built With

  • common-lisp
Share this project: