Re: Linux for JavaVM

bofh@snoopy.virtual.net.au
Tue, 07 Jan 97 22:00:17 +1000


> Has anyone considered the possibility of porting linux to the JavaVM? I

I don't think that this is a possibility. C and Java are totally different
languages with different ways of managing memory, code calling, and program
design. There is no way you could simply re-write the code. When you have
something like a PASCAL or ADA program that you want to convert to C (or the
other way around) then you can mostly just replace syntax and rename variables
(I've done this sort of thing a few times). But Java and C are too different.
C++ to Java would be possible if the C++ was structured in the right way, but
not C to Java.

>expect that it would run slowly on PC and server little purpose (other then
>running linux in linux in linux)... But maby it could make linux a viable OS

Running Linux in Linux in Linux would be a great thing! I've been reading
reports about how IBM's older mainframes worked and specifically about the
architecture of VM/DOS. Apparently they had a virtual machine which the OS ran
in, the VM provided file access and linear memory to the OS. The first OS to
run got real memory and every OS run in a VM under that got a chunk of virtual
memory. File access calls were just passed down through the chain.
I think that if Linux could do this then it would be a really handy feature
and make it much easier to do kernel development (any kernel code other than
file system stuff could be run as a user process and debugged in normal fashion
- crashing a kernel in a VM would not take the machine down). It would be a
lot of work though and any such code you developed would be unlikely to make it
into the version of Linux maintained by Linux (you could always seperate out
your own source tree though if you were really keen).

> On another note: I see to recall a long time back an argument in one of the
>comp.os (minix I think) newsgroups where someone told people not to do work on
>linux (I think this was around 0.12 or so) because 'Monolithic kernel design
>is antiquated' and that it would be IMPOSSIBLE to port linux to other archs so
>we would never see it on anything but ix86.... :) lets see ... Hmmm....
> $cd /usr/src/linux/arch
> $echo *
> alpha i386 m68k mips ppc sparc sparc64
>Hmm.. That looks like more then 1.. hehe.. Anyone have a copy of those
>newsgroup postings? Anyone know who other party in argument was?

The other party was Andrew S Tanenbaum. He was right on the issue of design,
but Linux works better than a lot of systems with nicer designs so we'll use it
anyway!
As for being micro-kernel, the existance of those directories under
/usr/src/arch gives Linux as much claim to being micro-kernelled as NT (which
is still 0).

>On a third note, is there any work being done on a binary emulatory..
>Something of the sort so that a i386 linux bin could be run on an alpha?? I

There is a system called Boechs (http://world.std.com/~bochs). It currently
emulates 386 systems for running OSs, but code from it could potentially be
used to execute 386 binaries on Alpha. As it's not free software it'll
probably never be used that way, but it proves the concept...

Russell Coker