I've looked at AROS and Java's JVM.
The JVM can only run one program per JVM and runs in a single global address space. It uses a stack rather than registers to keep track of memory and loads classes as its libraries.
AROS is an exokernel when running on bare metal and a virtual machine when hosted on another OS.
AROS is also a single address space OS when running in either state.
My idea is to use multiple address spaces and to keep the programs and services isolated from each other.On AROS the dynamic link libraries are relocatable ELF objects. The first time a library is opened, it is loaded from disk and relocated with the start address it was loaded to. On AROS and Amiga-like systems, memory is shared between all code running on the system as a single big memory region. This approach allows all programs to use the library loaded at the memory it was loaded to.
Other systems, including Windows and Unix, have a different virtual address space for each process. Here too the OS tries to load the shared library only once and it then maps the same library in the address space of each of the processes using it. The library may thus be located at different addresses in the different spaces and the OS has to handle this.
Windows will first try to locate the shared library at a single location in memory and tries to map it to the same memory region in each process that uses the library. If this is not possible the library will be duplicated in memory. On most Unix systems this problem is avoided by letting the compiler generate position independent code, e.g. code that works at any position in memory without having to relocate the code. Depending on the architecture this type of code may have less or more impact on the speed of the generated code.
I'm thinking of something like microkernel message passing between address spaces.
This could allow many extendable features such as file systems and other things to be added without to much trouble? In a sense I'm trying to replace the idea of relocatable ELF files or Java class files with a standard Dynamically linked ELF or bytecode executable each having their own address space.
would this be possible to have a multi-address space virtual machine with a message passing interface?
Final note: one of the major goals of this is to be able to use certain servers from my microkernel like system in this hosted virtual machine.