JavaOS is an operating system with a Java virtual machine as a fundamental component. It is developed by Sun Microsystems. Unlike Windows, Mac OS, Unix or Unix-like systems which are primarily written in the C programming language, JavaOS is primarily written in Java.
As with all operating systems, the primary role of a Javaos is to manage resources in such a way so as to allow more than one program to run concurrently.As resources we define the set of computational power, memory space and I/O bandwidth that running programs compete for.
In java OS, all device drivers are written in Java and executed by the virtual machine. A graphics and windowing system, implementing the AWT API is also written in Java.
In the case of a Javaos , the JVM is the component responsible to interact with the hardware. Since the JVM expects an operating system to do the hardware interaction in its place, a compatibility layer between the JVM and the hardware must be built. This layer must do little more than initialising the hardware, setting up a context switching environment for servicing interrupts and branching into the JVM. Device drivers would better be kept out of the compatibility layer and be directly implemented in Java, because this will make them portable and enable them to use the classpath facilities.
Two approaches to organising resources
Process based: All executed programs run on the same JVM. The virtual machine builds the notion of a process by using seperate classloaders for each loaded program. Each program is tricked to believe it is running in its own virtual machine by being with private copies of bootstrap classes and its private memory space and garbage collector. Changes in the JVM are required to support this model.
JVM based: Each executed program consists of one or more Java threads. A supervising thread is responsible for spawning new programs as needed using a well defined interface. Language-based memory protection and thread synchronisation mechanisms are used to protect shared resources. Loaded programs become part of the system’s classpath and so other programs can directly access their methods, but namespaces and method access control can be used to protect the program internals. No changes are required to the JVM.
In the case of the Javaos , the classpath has to be modified to use the OS’s subsystems instead of native calls. Finally, although the size of the classpath seems too big to be used as the basic Javaos library, the classpath is the only library most Java applications will ever need to run.
JavaOS was initially designed to run on embedded systems.
From 2006 onwards Sun considers JavaOS a legacy system and recommends migration to Java ME. This by itself however is not a full replacement, as Java ME is an API specification, which runs on top of an operating system, and is not an operating system in itself.
Sources:
ftp://ftp.cs.man.ac.uk/pub/apt/theses/GeorgiosGousios_MSc.pdf
wikipedia
Thursday, January 6, 2011
Java OS
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment