Send As SMS

2004-03-28

Write A JVM and OS with Java Itself

It is realy a interest things to write the Java VM and even the OS itself in Java, there is some projects tring to do it. JikesRVM is a JVM build on Java itself, and jnode is a OS(include a JVM) build on java, also there is a VM named joeq which is build on Java itself.


I realy think this would be the next choice to implement a JVM and a OS in java, specially for embeded environment and next-generation os. In the next OS, virtual memory is not nessicary.


Structure:


VM*.java --(aot compiler) -> VM Bootstrap Image


The core of the VM is task management, We may build the OS without virtual memeory, but we can allocate a standalone heap for each Process, In such a case, when we need to terminate the Process, we can free the memory at all. Dont use virtual memory makes the thread as simple and fast as possible.


So there is a VM process, a application process, and maybe the FS, DB Server can be standalone process. Process can use service provide by other Process, and use the "pass-by-value". or create a share Process which shared by each other.


A Process is a memory which contains object, both the Java Object and VM Object are both same.


the AOT compiler compile a class to an VM_Class, and also VM_Method, the link can be done at runtime.


We may also use C/ASM to provide additional process, using JNI or a lowlevel FastJNI(which shares the frame as same).

0 Comments:

张贴评论

<< Home