Page 1 of 2

an idea for someone else...

Posted: Fri Aug 18, 2006 11:43 pm
by earlz
hi this is really more of an idea for someone besides me as I would never attempt it; too much work

but if anyone feels inspired since it is a reachable goal(kindof)
but anyway

what if their was like an OS that used an intermediant code like java(more powerful though) as their application format; it lets the OS control everything and makes the OS super portable.
and it do at-load interpretting to machine code

anyway just thought I'd share that with someone, wasn't really by me but by a guy that attempted it and gave up

Re:an idea for someone else...

Posted: Sat Aug 19, 2006 12:48 am
by proxy
http://www.jbox.dk/sanos/

Sanos is a minimalistic 32-bit x86 OS kernel for Java based server appliances running on standard PC hardware.

proxy

Re:an idea for someone else...

Posted: Sat Aug 19, 2006 12:41 pm
by Cheery
There has been various attempts for this. None of the mainstream languages are able to fullfill it, because they all suck more or less over the crappiness point.

I don't surely believe there currently exist such intermediate level -code which would be penalty free and allow such portability for OS.

Plus, I would like if people didn't use java at all. It is horrifying, evil. I believe it'd be more comfy to be in the deepest sea in 1 cubic volume than trying read and understand AI program made with java(very common high level usecase!). For me, using java gives the same feeling as being captived into a 2dl drinking glass.

Re:an idea for someone else...

Posted: Sat Aug 19, 2006 1:17 pm
by James
Didnt he say based on a language. Meaning not just Java?

Re:an idea for someone else...

Posted: Sat Aug 19, 2006 1:57 pm
by Bob the Avenger
A mate i used to OSDEV with is doing something sortof similar, but more in the lines of software based memory management i.e no use of the MMU chip etc. These kind of ideas interrest me, and i reckon i'll experiment with something similar too.

Peace

Re:an idea for someone else...

Posted: Sat Aug 19, 2006 2:28 pm
by Candamir
Jordan3 wrote: what if their was like an OS that used an intermediant code like java(more powerful though) as their application format; it lets the OS control everything and makes the OS super portable.
and it do at-load interpretting to machine code
Just by using a more portable language, you don't have a more portable OS. Because if paging works like this on x86 and like that on PPC (just saying something), you cannot do this with the same code, even if it's written in Java. Besides, when I think at the runtime environment you have to provide... :-\ It'd be like the Java OS inside the Java Virtual Machine & Java Runtime Environment OS...

Nevertheless, I think it would be a good idea to perhaps write some servers in a microkernel in Java... (I don't want to spark a flame, but as my OS is intended to run robots (in a very, very distant future, though ;D), I plan some kind of AI server with artificial neuronal networks, and I do like Java for this kind of purpose...). Anyway, even here, you had to provide a JVM + JRE... But I had the idea of maybe writing a JVM-compatible scheduler. That is, there is one JVM process running on every processor, registered with the kernel scheduler as every other program, plus that it might has a flag set: is_jvm. Thus, Java programs can also be registered with the scheduler, but with the flag is_java. When some Java program must run, the kernel scheduler jumps to a program with this is_jvm flag and tells it which byte code to execute. Like this, you could spare the overhead of running more than one JVM per processor.

Naturally, one could extend this concept for every interpreted language...

Candamir

Re:an idea for someone else...

Posted: Sat Aug 19, 2006 3:55 pm
by earlz
hmmm I didn't exactly say to use java; even if their was like a "universal" machine code that had opcodes for adding and moving and was interpreted by the OS at runtime

and I didn't really mean that the OS be made in java/whatever

Re:an idea for someone else...

Posted: Sat Aug 19, 2006 4:02 pm
by Candamir
Jordan3 wrote: and I didn't really mean that the OS be made in java/whatever
Oops. My talk has been a "little bit" off-topic, then... ;)

Candamir

Re:an idea for someone else...

Posted: Sat Aug 19, 2006 9:08 pm
by spider
i was actually thinking of doing something like this for my OS, but i was going to us java, and just build the kernel around the java vm and have that the only none java program ever running. This way i already have a large software base for my OS and plus any java app made in my OS will run on any system and vise versa.

Re:an idea for someone else...

Posted: Sat Aug 19, 2006 9:48 pm
by Candamir
spider wrote: any java app made in my OS will run on any system and vise versa.
That's the point of Java ;). I would also like to add that Java is now in very widespread use on servers, and so if anyone is planning to use its OS on a server should think about writing a JVM or at least port some opensource implementation of it (altough in my personal opinion I'm very fond with the idea of writing a JVM and/or compiler for my OS, firstly because it is quite a "big" standalone application to test my OS with and second, because my Java skills would greatly benefit...)

Candamir

Re:an idea for someone else...

Posted: Sun Aug 20, 2006 2:59 am
by slash
Hi Jordan3,

Checkout Inferno OS. It is a subset of highly protable Plan9 kernel and has integrated virtual machine called Dis and all of its apps are written in Limbo prog language. So all you have to do is port architecture specific code(which can be very small depending on platform) and you have a full OS. No need to port ibs and apps.

Re:an idea for someone else...

Posted: Sun Aug 20, 2006 12:14 pm
by Habbit
Well, I wanted to do something like that, but targeted at the .NET Framework CLI and VERY microkernel-oriented. That was, at least, my original project, called Shortcut, but since I want to make it good from the ground, I am first going to make a clone of a "simple" OS (no GUI or whatever) in order to get a grasp on fundamentals so I dont get a load of crap and unreadable, unmantainable and broken code fu out of my shiny idea ;)

PS: any ideas on a name? maybe UCOS (for unix clone OS) or wicos (for win, though it should be witchOS then)

Re:an idea for someone else...

Posted: Sun Aug 20, 2006 6:58 pm
by Colonel Kernel
Habbit wrote:Well, I wanted to do something like that, but targeted at the .NET Framework CLI and VERY microkernel-oriented.
This has already been done.

Re:an idea for someone else...

Posted: Sun Aug 20, 2006 10:44 pm
by Solar
Cheery wrote: There has been various attempts for this. None of the mainstream languages are able to fullfill it, because they all suck more or less over the crappiness point.
Tao's elate does it for plain good old C.

Re:an idea for someone else...

Posted: Tue Aug 22, 2006 9:35 pm
by Warrior
Colonel Kernel wrote:
Habbit wrote:Well, I wanted to do something like that, but targeted at the .NET Framework CLI and VERY microkernel-oriented.
This has already been done.
I love the idea of Singularity and I just watched the latest Channel9 video on it. The idea of using C# to code the major components of the kernel is amazing.

Exactly how much is done in Assembly/C? I read somewhere that some code is written in Unsafe C# so I'd imaging they deal with some form of low level things.

I'd think to just build a minimalistic microkernel in C and a VM ontop of that.

I like their idea however to run things in one priviledge level using SIPs and use message passing to communicate.

After some wikipedia-ing they seem to use a seemingly private project to convert CLI opcodes to x86 opcodes so I guess that none of the C# code is JIT'ed but converted to native code?