OS/JVM dialectic – ending the struggle through unity
The JVM is an interesting beast, being a runtime and a virtual machine it shares a lot of its behavior with the operating system beneath it. It has concepts like threads, a heap for object allocation and code execution in sandboxed environment. The JVM uses resources from the operating system to implement its functionality, but as noted it also looks a lot like the operating system itself. Sometimes it’s useful that the operating system is beneath the JVM – we can, for example, use operating system thread directly. Other times, however, this is not a good thing. We want the same control of the machine in userland from the JVM as the OS has only in kernel land.
This has led to the boundary between the OS and the JVM becoming blurry. A JVM is basically just an operating system that does one thing – run Java. We will cover practical examples from the past of meta-virtual machines and also discuss projects like the (now dead) hypervisor only JRockit VE OS as an example of strange hybrids and explain what can be gained from them.
We’ll talk about threads, locks, and I/O implementation from a JVM and an OS perspective. The talk also contains a historical retrospective on virtual machines and operating system interaction that stretches back to the seventies. We’ll make educated guesses about where the future is heading.