Page 1 of 1

JVM Operating System. does it exist?

Posted: Wed Mar 17, 2010 12:12 pm
by clwillingham
ever since i learned about java, i've always thaught that it would be an interesting idea to implement the JVM directly onto hardware. i have of course heard of Jnode and JavaOS, but those are pure java. the JVM itself isn't even written in pure java. what i want to know is, is there any implimentation for the JVM on the hardware level. what i mean is, it doesn't matter what the language its written in (C/C++, pascel, intercal... doesn't matter), but if Java runs in a Virtual machine, then you would think you could put it on a Real machine without any virtualization. So does this exist? am i crazy to ask these question? if it doesn't exist, how hard would it be to implement? i know such a thing exists for Squeak smalltalk which runs on a VM so it would make sense that the JVM could exist on its own with a basic kernel and libc framework under it.

Re: JVM Operating System. does it exist?

Posted: Wed Mar 17, 2010 1:11 pm
by Hangin10
http://en.wikipedia.org/wiki/Java_processor

Is that what you mean? I'm not sure if your paragraph is logically consistent within itself. First you talk about JavaOS, and then say it is pure Java; then you say writing the OS to just be a JVM is ok. Lots of operating systems have been written so that their user executables are high level bytecode.

The JVM can't be written in completely pure Java, as the (likely x86 PC platform) CPU doesn't use Java bytecode as its instruction set; normal Java also has no low level I/O either, so it would be interesting (to me) to see what modifications to the language were used to create JavaOS. If it were to have a kernel under it, then you already have a kernel which runs only the JVM as its only user program.

Re: JVM Operating System. does it exist?

Posted: Wed Mar 17, 2010 2:02 pm
by Love4Boobies
Typically if a managed OS is running on top of a non-managed CPU in a JVM, I/O primitives and a few other unsafe things are implemented in native code but can be called by the managed code.

Re: JVM Operating System. does it exist?

Posted: Wed Mar 17, 2010 5:26 pm
by clwillingham
Hangin10 wrote:http://en.wikipedia.org/wiki/Java_processor

Is that what you mean? I'm not sure if your paragraph is logically consistent within itself. First you talk about JavaOS, and then say it is pure Java; then you say writing the OS to just be a JVM is ok. Lots of operating systems have been written so that their user executables are high level bytecode.

The JVM can't be written in completely pure Java, as the (likely x86 PC platform) CPU doesn't use Java bytecode as its instruction set; normal Java also has no low level I/O either, so it would be interesting (to me) to see what modifications to the language were used to create JavaOS. If it were to have a kernel under it, then you already have a kernel which runs only the JVM as its only user program.
i suppose your right. i didn't explain my idea that well. what i meant was basically the java processor. a JVM with a real machine replacing the VM. people are always talking about the JVM but if its a VM then why not just make an JM?

Re: JVM Operating System. does it exist?

Posted: Wed Mar 17, 2010 5:33 pm
by NickJohnson
The main issue is that the JVM is quite complex, and a real processor that would emulate it would be hard to build. Garbage collection would be quite tricky, not to mention that it would be crazy to write OS code using it (no pointer arithmetic), so all of the devices would have to have drivers in the processor/JVM thing or have object oriented interfaces, which would make devices cost a zillion dollars because of the full microprocessors needed inside each of them. The JVM is just not designed to be a real machine.

Re: JVM Operating System. does it exist?

Posted: Wed Mar 17, 2010 6:53 pm
by geppyfx
So, they decided to take over the CPU market from another end: first software then cpus.
Just a thought.

I guess MS is already building cpu for .net

Re: JVM Operating System. does it exist?

Posted: Fri Mar 19, 2010 5:03 am
by Benk
Something like Singularity would do it .. it would just compile the Byte code to trusted native code and reject nasties.

Re: JVM Operating System. does it exist?

Posted: Fri Mar 19, 2010 6:21 am
by donkeeland
NickJohnson wrote:The main issue is that the JVM is quite complex, and a real processor that would emulate it would be hard to build. Garbage collection would be quite tricky, not to mention that it would be crazy to write OS code using it (no pointer arithmetic), so all of the devices would have to have drivers in the processor/JVM thing or have object oriented interfaces, which would make devices cost a zillion dollars because of the full microprocessors needed inside each of them. The JVM is just not designed to be a real machine.

I see that you didn't know the ARM Jazel or some open source like JOP !

Re: JVM Operating System. does it exist?

Posted: Wed Jun 09, 2010 4:47 pm
by sprints
Check out JX.

its essentially a java os

Re: JVM Operating System. does it exist?

Posted: Thu Jun 10, 2010 1:41 pm
by Selenic
donkeeland wrote:I see that you didn't know the ARM Jazel or some open source like JOP !
Partial hardware emulation plus software help != full hardware emulation. Jazelle, for example, still needs to run under a JVM process to handle all of the tricky stuff, it's just the simpler instructions which get emulated directly (the rest are treated as calls to handlers); sure, you could write a fair bit of the OS in Java and use this, but you'd need a near-full native-code JVM and at least part of each driver would have to be native too.

Re: JVM Operating System. does it exist?

Posted: Thu Jun 10, 2010 5:31 pm
by Owen
JOP is a complete JVM in hardware IIRC.