aspose file tools*
The moose likes Meaningless Drivel and the fly likes Developing OS in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "Developing OS in Java" Watch "Developing OS in Java" New topic
Author

Developing OS in Java

Vikrama Sanjeeva
Ranch Hand

Joined: Sep 02, 2001
Posts: 756
Hi,
It is commonly seen that, Operating Systems are developed in C,Assembly...and may be other languages.But what is your opinion about Developing Operating System in Java.I think the major difference in Java & C,Assembly is Hardware Control.But Java's native methods can solve that problem easily.Anyway, whats ur opinion??
Bye.
Viki.


Count the flowers of your garden, NOT the leafs which falls away!
Prepare IBM Exam 340 by joining http://groups.yahoo.com/group/IBM340Exam/
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
What do you see as the BENEFIT of using java as the base language for an operating system. Obviously platform independance does not play into the equation . . .
Plus, I believe that this has already been done - here.
[ January 28, 2002: Message edited by: Cindy Glass ]

"JavaRanch, where the deer and the Certified play" - David O'Meara
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I dont think Java is appropriate for developing OS
because of the ff reasons:
1.) An OS is tied to a particular platform/hardware. You need a language that allows you to have complete control of your machine.
2.)Java doesn't satisfy this requirement
because it is created to be portable in many platforms, so Java may be "too generic" and may not provide programmers complete control over the hardware.
3.) Yes you can use JNI, but doesn't make sense
because your code will be full of native calls anyway.
Wasabe
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Viki,
I back up Cindy and Wassabe on this one. There is no real proven benefit of having a Java Operation System. Tell me one? And the API that make the interaction between Java and the hardware possible IS the operating system itself.
However I would think of Java more as a kind of application framework or desktop environment like Gnome for instance.
Moreover read this:
ARM AND SUN TEAM UP TO OFFER DIRECT JAVAOS SUPPORT (looooong time ago in '97)


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Vikrama Sanjeeva
Ranch Hand

Joined: Sep 02, 2001
Posts: 756
Thanx for ur feedback ranchers.Yes u guyz r right that Java is not good for Hardware control as C & Assembly.And JNI is a good feature of Java but there will be # of JNI's in our code if we select Java for OS.Cindy i've seen the link u provide, i.e JOS.It get not much response.Yes Valentin, i agree with u that Java is stronger at application side rather than OS developing.
Actually i am serveying different places for my FIP(Final Year Project).Thats why, i am discussing various ideas & thoughts with different pplz.It's my 3rd yr, & hopefully after 1 yr i'll be starting my FIP.So i have to decide what i've to select as my FIP.Any help or idea regarding FIP, will be appreciated highly.
Bye.
Viki.
Raed Al Qahtani
Greenhorn

Joined: Jan 29, 2002
Posts: 2
Originally posted by Valentin Crettaz:

There is no real proven benefit of having a Java Operation System.

Yes. You could have a completely object oriented operating system API. Of course JNI does not come into the picture when you develop an OS in Java. JNI is an interface for Java to access resources outside the JVM. If the operating system were written in Java, there would be no JVM, just the OS and your java code
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Originally posted by Raed Al Qahtani:

Yes. You could have a completely object oriented operating system API. Of course JNI does not come into the picture when you develop an OS in Java. JNI is an interface for Java to access resources outside the JVM. If the operating system were written in Java, there would be no JVM, just the OS and your java code

That's nonsense Raed !!!
How would you achieve one of Java's primary goal, aka portability, by having Java code handle directly the underlying hardware??? I'd be happy to hear that...
Since we have a lot of different architectures you'd wind up having different hardware-handling Java code for different machines... That's a vicious circle and moreover Java has not been invented in that goal.
Believe me, nobody wants Java to pilot underlying hardware... But as I said, Java would be much more useful as an application framework or desktop environment...
Jim Bertorelli
Ranch Hand

Joined: Nov 28, 2001
Posts: 136
You can definitely write an OS in Java and as a matter of fact there already are OSs in Java. Another fact, is Java was not at all invented for application framwork purposes but was invented specially for writing "OS"s for user appliances.
Java is nothing but a language. The key is the JVM, where V stands for Virtual. Meaning, the machine (or the CPU) that understands Java code is not a physical CPU but a software that sits on top of a physical CPU and translates Java code into that CPU's language.
Java enabled chips are nothing but a physical incarnation of the JVM. Here, the CPU itself understands the java byte code ( compare to Intel Pentium understanding assembly code).
To tame the Java based CPUs, you have to write the software in java itself. This taming software is what is called an OS. The term OS does not necessarily mean a Windows or Unix like program. It can be any program that abstracts any chip and provides an easy interface for the developers to utilize the chip's power.
The original idea to have a java was to increase the programmability of the chips used in common appliances like Mirowave, TV, dishwasher etc.
It's a totally different matter that it was the internet that liberalized Java.
[ January 31, 2002: Message edited by: Jim Bertorelli ]
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Originally posted by Valentin Crettaz:
How would you achieve one of Java's primary goal, aka portability, by having Java code handle directly the underlying hardware???

Of course if you write an OS in Java it would have to be hardware specific, and would not be portable. That does not mean that it can not be done (it has).
In addition, for performance, the final version would *probably* be deployed as completely compiled code - since it is already platform dependant anyway. So no JVM in this context. However, Jim points out that chips use bytecode with a JVM anyway, so that is ONE possible approach.
I just do not see the real advantage of using Java over other languages.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
First, I apologize to Raed for that "nonsense" thing.
Jim,
I know all that, but like Cindy I just don't see why it would be more advantageous to use Java instead of another language.
I haven't claimed that you can't write an OS in Java what I said is that Java makes a wonderful job on top of the OS and it would be tempting to remove the bridge between both layers, but I don't think it would be in the interest of the majority of the developer community. We already have 3 different (yet complementary) editions of Java.

The original idea to have a java was to increase the programmability of the chips used in common appliances like Mirowave, TV, dishwasher etc.

Jim, I'm well-aware of that but I guess the word "OS" just caused me to think about common OS we have nowadays. Believe me I'm a fervent defender of the Java technology, but I just think that in order to let Java keep its credibility we shouldn't mix it with everything. Some Redmondian have attempted that and have their products spread all over the place, but their reputation and credibility is not at the highest level of the scale
Moreover, if such chips were sooooooooooo attractive to dishwasher-chips developers, why are they not in mass-production yet?
Jim, forget my first post, my thought were not well-expressed, I just hope this one may lead to a better debate.
Jim Bertorelli
Ranch Hand

Joined: Nov 28, 2001
Posts: 136
Again, wrt the chips used by the appliances, java based chips have a definite advantage. Currently, even same appliance from different brands use different chips. So the developers have to rewrite the whole code again. Java based chips will allow main stream developers to write portable applications for such appliances.
Now, this was the basic idea. How far has this been successful, is debatable. But nobody seems to be bothered because Java, meanwhile, found a new host and thus a new life.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
I went to a really cool seminar - where a person from HP was presenting the future of chip technology and its interaction with Java. This was about a year ago.
I was truely impressed with some of the stuff that is going on in that arena. One of the coolest things was concept of giving EACH appliance its OWN IP address.
Just think about it. You have a Garage Door with a chip in it and an IP address. You are at work, and you can't remember if you closed the Garage Door. You get on your browser and URL over to your G.Door chip - and CHECK it. If it is open - you access the chip menu to close the door. Awesome. Now expand that to checking your coffepot, your house thermostat. etc. A year ago these things were just coming out of the initial design phase - so I would expect to start seeing some of these things on the market soon.
In addition, imagine a remote control with a chip that can be wirelessly programmed. So you can get your remote to access the menu on your Microwave, your house thermostat, your TV (of course), Your lighting system (if you have upgraded to a system with a chip). Now you can control all this stuff from your armchair, with ONE remote. Also, you can download any chip programming updates without taking the devices into the store for re-programming.
This is really cool stuff, and WILL be here tomorrow or sooner. Once the population catches on to the posssibilities, then the chip market is going to explode!! I am convinced.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Originally posted by Cindy Glass:
Just think about it. You have a Garage Door with a chip in it and an IP address. You are at work, and you can't remember if you closed the Garage Door. You get on your browser and URL over to your G.Door chip - and CHECK it.

Just what we need. Hackers making everyone's garage doors open and close all day and if your garage door OS was written by MS, your garage door would crash everyday.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Good one about MS, Thomas
Cindy, I'm really looking forward to the day where those chips are gonna submerge the market...
I'm much more positive now when talking about Java OS in appliance stuff. I guess at the beginning of this discussion I was way too focused on Java OS for desktop computers... But it makes much more sense to talk about Java in those tiny little chips...
Vikrama Sanjeeva
Ranch Hand

Joined: Sep 02, 2001
Posts: 756
Well, Developing Operating System in Java seems that, may BE or may NOT be advantegeous as compared to other languages.However Jim defines very well about using Java enabled chips & specially, the independency in developing a program for Java enabled chips.I sometime thinks that, the Java's magic, i.e independent platform nature, is achieved due to Dr. James Gosling approch for developing a language for home appliances, OAK.Since home appliances has different architecture.Therefore if somebody wants to develop a language, which should be understood by all deifferent architecture appliances so it should be arcitecture independent language.

Moreover, if such chips were sooooooooooo attractive to dishwasher-chips developers, why are they not in mass-production yet?

I have some little research on this, when i have started Java.What i concluded is that, first of all Dr. James Gosling was successful in developing an architecture inedependent language.But the biggest problem was the cost of such Java enabled appliances.Yes the cost was too high, that the companys has refused to invest on such appliances.According to companies, there client will hardly pay for such machines.
Well, i am here with u & hopefully will continue more on this topic with some new ideas next time.
Bye.
Viki.
[ February 02, 2002: Message edited by: Vikrama Sanjeeva ]
Sameer Jamal
Ranch Hand

Joined: Feb 16, 2001
Posts: 1870
Operating System has many layers and the lower most layer is Hardaware Interaction layer basically which interacts with the hardware of the machine , That Hardware Interaction Layer Can be developed in C or Assembly langauge as they r platform dependent, and the above application layers can be developed in Java and the interaction between the two can be done by JNI .
Sameer Jamal
Ranch Hand

Joined: Feb 16, 2001
Posts: 1870
Originally posted by Cindy Glass:
I went to a really cool seminar - where a person from HP was presenting the future of chip technology and its interaction with Java. This was about a year ago.
I was truely impressed with some of the stuff that is going on in that arena. One of the coolest things was concept of giving EACH appliance its OWN IP address.

Well this only possible when we have IP vsersion 6.0, IP version 4.0 cannot handle so many IP adresses that we can give each appliance its own IP address and presently Java does not have support for IP version 6.0
Jim Bertorelli
Ranch Hand

Joined: Nov 28, 2001
Posts: 136
Java 1.4 does.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Developing OS in Java