Java multi CPU capabilities

ted leslie ted.leslie-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Thu Aug 29 00:54:54 UTC 2013


ps and top by default only show process not threads. There is opts to show
threads. In mono I have written program that showed many 100s threads on a
process and utilizing 4 cores.

Maybe there is some reason the hardware you are working on wants to be
super thread safe or something. I know gui are usually single threaded to
prevent a lot of foot shooting.
I would guess Java has been able to do multi thread concurrent on
multicores for over 10 years. C# could and back then Java was more powerful
in just about every way over c#. Definitely not the case now however.
.tl
On Aug 28, 2013 8:03 PM, "William Muriithi" <william.muriithi-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
wrote:

>
> > java is NOT the application.  It is the language and runtime for the
> > application.
> My bad. Agree, that a serious error on my side.
>
> >If an application wants to use multiple CPUs, then the
> > author of the application should write a threaded application.
> >
> But how do you achieve that if your application is restricted without a
> container that is only single kernel threaded?
> > There is certainly research into making runtimes and languages that
> > can automatically make some parts of the code run in parallel, but that
> > isn't something you are likely to see in current production systems.
> >
> That seem to be the case
>
> > So if your application written in java creates multiple threads, then
> > it will use multiple CPUs just fine.
> >
> Not necessary.  Sure, you can have as many threads as you want in the
> container, but if that container just make a single kernel thread, you
> wouldn't be able to sprend the thread across more than one CPU.
>
> That's what I am observing on both openjdk and sun Java.
>
> Casually check any server running Java based system and you will see the
> whole application look like a single process to the operating system.  How
> do you explain that?
> > --
> > Len Sorensen
> > --
> William
> > The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> > TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> > How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20130828/e6d17b06/attachment.html>


More information about the Legacy mailing list