Monday, September 28, 2009

Jikes: A Metacircular VM

A metacircular VM is a sandbox written in the same language as the programs it is running. In this case, Jikes is a Java runtime written entirely in Java!

While this takes a bit of a performance bit, it has the advantaged of being able to take advantage of the facilities of the Java run-time such as managed code and garbage collection. However, it is not quite as fast. It is also not usually good practice from a security standpoint to implement an interpreter for a language is the same language, but in this case may be acceptable due to Java sandbox.

Jikes had to implement its own threading model due to the lack of support in operating systems when it was created (1997) for support of potentially hundreds of threads. By providing their own threading model they are able to support as many threads as needed. While the OS limit isn't as much of an issue today (see Pushing the Limits of Windows: Processes and Threads), having a consistent model can make portability a little easier.

No comments:

Post a Comment