ryanheise.comsoftwarerheise.osdevelopment → overview


The virtual machine

At the lowest layer of rheise.os is the root virtual machine. It has the following responsibilities: The root virtual machine takes on the responsibility of executing and switching threads, defining classes and enforcing type safety for all lightweight JVMs. Since it is responsible for defining all classes,  it is able to determine when different JVMs are loading the same classes, and share the common segments in memory. This significantly reduces the memory requirements of each lightweight JVM.

A layered view of rheise.os is shown below:
Lightweight Java Virtual Machines
(process 1)
(process 2)
(process 3)
Root virtual machine
  • Thread switching
  • Resource control
  • Bytecode translation
  • I/O abstraction
  • Memory management
  • Persistence

In order to facilitate JVM interaction, the root virtual machine employs an extended type system that supports type compatibility between JVMs. For example, if the root virtual machine determines class X in JVM(1)  to be compatible with class Y in JVM(2), it will allow a cast from type X to type Y. Within each JVM however, the type system has exactly the same behaviour as the Java type system. The type system used by the root virtual machine is the basis for efficient interprocess communication in rheise.os.

The operating system

The major components of the operating system are executed in bytecode above the root virtual machine. Each component is contained in its own JVM, and can interact with other system components through various forms of IPC enabled by the root virtual machine's type system.

In rheise.os, each JVM represents a process. The processes that make up a running system are shown below:
Java processes
Application 1 Application 2 Application n ...
Security Networking Windowing system Service n ...
  • Process management
  • Kernel modules
Disk driver Video driver Keyboard driver Module n ...

In this diagram, each application, service, and the kernel, is a process. The kernel also contains modules, such as device drivers. These are not run in separate processes, but are loaded into separate class loaders within the kernel process. This enables them to be reloaded by the kernel at runtime.