Marcus Lagergren — 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.

  1. Marcus Lagergren
    One of the founding members of Appeal Virtual Machines, the company that developed the JRockit JVM, bought by BEA Systems in 2002. Team lead and architect for the JRockit code generators; he has been involved in pretty much every other aspect of JVMs over the years. Between 2007 and 2010, worked for Oracle on fast Virtualization technology. As of September 2011, he is a member of the Oracle Java language team, investigating dynamic languages on the JVM and general runtime futurist. Co-author of the book “Oracle JRockit – the definitive guide“, which, despite the product centric title, has been praised as the best book ever written on JVM internals. @lagergren