Jean-Luc Rochat wrote:
> 
> Frank Morton wrote:
> 
> > Is anyone running jserv/apache with a dual
> > processor system? Is there any difficulty
> > doing so?
> >
> 
> Yes I am. No, no problem . It's better to use JVM with native threads
> (vs green threads) in order  to get benefits from all the processors.

        OK, correct me if I am wrong but;

        1)AFAIK, The JVM itself is not a threaded program.

        So when it runs on a multiprocessor system, it still runs as one
process. 

        For example, if a thread makes a call to memory, that thread's request
is received by the non-threaded JVM and subsequently sent to the OS's
memory manager. 

Granted that the JVM process is capable of running multiple threads at
the same time very efficiently.

        A single 'monolithic' process (ie: not threaded) has no direct
performance advantages on an SMP system. Indirect advantages are derived
from the fact that other processes on the system can use the other
processor(s) in the SMP system as they become free (OS dependant).

        Also AFAIK, most common OS'es in use today are not trully
multi-threaded. NT, Linux, Solaris all can take advantage of multiple
processors, but are still processed-based and not thread-based in their
approach to programs running on them.


        Not before you get out your flamethrowers, please note the TWO 'AFAIK'
references above. I am a 4th year comp sci student, and I am basing my
opinions on my schooling and self reading. I have a dual PPRO system at
home running Linux (2.2.x kernel) and Windows NT. When I start a JVM on
either, it shows up in teh process list as a SINGLE process. 

        SUMMARY
        So even if your Java program is threaded, the bottleneck is still the
single-process JVM, reducing your gain on SMP systems from threading to
none. Optimization of many threads within the JVM itself is quite good
from what I have read.


        Please feel free to correct any of my statements as this is the only
way I will learn.

        Cheers

        Chris

-- 
__________________________________________________________________________
Pournelle's Law: 
If you do not know what you are doing, deal with people who do.
--------------------------------------------------------------------------


----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to