Subject: Re: Netscape 2.0beta1 - Port of HotJava to FreeBSD and NetBSD More Usefull?
To: None <terry@lambert.org>
From: Pete Delaney <pete@RockyMountain.rahul.net>
List: netbsd-ports
Date: 10/14/1995 15:44:30
   > 
   > > > > I heard there was some fairly good progress being made on a Linux port.
   > > > > Is this true?  Because if the Linux people have a working version, then a
   > > > > FreeBSD/NetBSD version would be almost trivial from there.
   > > > 
   > > > Not so.  According to Linus (and Alan Cox), Linux has kernel
   > > > multithreading.
   > > 
   > > I suppose a thread library, like SusOS has, is likely necessary, but I
   > > really doubt kernel multithreading is necessary. Any bets?
   > 
   > Sun's multithreading as of Solaris is a kernl/user space cooperative
   > model, with n kernel threads being mapped to m user space threads
   > (m >= n).

Sure for Slowaris this approach makes sense, but Slowaris runs noticably 
lower on sun4c that SunOS does. The added flexabilty of SMP in the kernel
forces a non-trivial performance impact on the kernel. Pyramid used macros
that only kicked in if compiled for SMP, this avoids the problem if done 
carefully. Etherway, SMP is a lot of work.

   > 
   > So the only real threading on Solaris is kernel.

Sure, but since most hackers will likely be using old Sun4c's, which cost
from $100 to $400 for the CPU board, I doubt the performance penality for SMP
is worth it for most FreeBSD users. Besides, waiting to get SMP working delays 
porting HotJava, I suspect that it's better to use a thread library like SunOS
uses.


   > 
   > The SunOS LWP library (a purely aioread/aiowrite/aiowait/aiocancel based
   > task switcher) is supported via the kernel calls for binaray compatability
   > reasons, but an lwp library is not provided for Solaris: you are expected
   > to use the kernel thread model.

What do you mean I'm expected to use a kernel thread model? I assume you mean 
in the HotJava code. I expect it's far easier to change any dependancies in HotJava
for Kernel bases threads than it is to implement SMP.


   > 
   > SVR4.2 and above uses the same model.

I read the SVR4.2 docs on SMP, and I found the Sequent SMP cod, which is 4.2 
based, much nicer. If we are going to make NetBSD SMP, I wonder if it's worthwhile
to ask Sequent if they would donate their Dynix OS SMP changes, which has been 
replace with a SVR4 code base, to the NetBSD community for integration into NetBSD.

In the mean time, I would think porting HotJava from a Linux port might be 
worthwhile. I heard from some of the guys at sequent that Sun got Slowaris
faster with help from Cray. Hacking SMP in netbsd is likely a major effort.
How far along is Jack Vogel on his SMP hacks?

 
   > 
   > 
   > 					Terry Lambert
   > 					terry@lambert.org
   > ---
   > Any opinions in this posting are my own and not those of my present
   > or previous employers.