Re: Can Java be used to write an operating system



On Tue, 3 Jun 2008, Dave Miller wrote:

devj.nullj@xxxxxxxxx wrote:
<snip>

I would like to enquire from the experts here whether Java can be used to program lower level applications like device drivers or a new operating system for that matter?

Probably the wrong language for a free standing driver and pretty much impossible for a free standing OS. Java utilizes an abstract computing machine (called a "Java Virtual Machine" or JVM) which sits on top of the native OS. In other words, you'd need an OS to run your OS.

Yebbut you can write the JVM in java, and have it compile itself, isn't it:

http://jikesrvm.org/

Once you have that kind of capability - and Jikes includes ways of expressing unsafe but essential operations like direct memory access - there's no reason you couldn't write an OS all the way down to the bare metal. You might need a smattering of assembly to initialise the processor, set up interrupt handlers, things like that, but you could completely replace C.

I have no idea how far along this JNode project is, but long, long ago, in an industry far, far away, a company called Symbolics actually shipped an operating system written entirely in LISP:

http://lispm.dyndns.org/genera-concepts/genera.html

tom

--
For me, thats just logic. OTOH, Spock went bananas several times using
logic. -- Pete, mfw
.



Relevant Pages

  • Re: Sun continues sad decline
    ... Could the scheduler written in Java schedule Java threads? ... the "master JVM" or "kernel JVM" controlled? ... Device drivers are definitely possible. ...
    (comp.sys.sun.misc)
  • Re: Sun continues sad decline
    ... Could the scheduler written in Java schedule Java threads? ... the "master JVM" or "kernel JVM" controlled? ... Device drivers are definitely possible. ...
    (comp.unix.solaris)
  • Problem with jvm on Matlab
    ... Fatal Java Exception detected at Fri Oct 12 20:12:03 2007 ... MATLAB Version: 7.4.0.287 ... Operating System: Linux 2.6.18.2-34-default #1 SMP Mon Nov 27 ... increase the memory used by jvm or something else.. ...
    (comp.soft-sys.matlab)
  • Problem with jvm on Matlab
    ... Fatal Java Exception detected at Fri Oct 12 20:12:03 2007 ... MATLAB Version: 7.4.0.287 ... Operating System: Linux 2.6.18.2-34-default #1 SMP Mon Nov 27 ... increase the memory used by jvm or something else.. ...
    (comp.dsp)
  • Problem with jvm on Matlab
    ... Fatal Java Exception detected at Fri Oct 12 20:12:03 2007 ... MATLAB Version: 7.4.0.287 ... Operating System: Linux 2.6.18.2-34-default #1 SMP Mon Nov 27 ... increase the memory used by jvm or something else.. ...
    (comp.soft-sys.matlab)