<p>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. </p>
<p>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. <br>
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. <br>
.tl</p>
<div class="gmail_quote">On Aug 28, 2013 8:03 PM, "William Muriithi" <<a href="mailto:william.muriithi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org">william.muriithi@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p><br>
> java is NOT the application. It is the language and runtime for the<br>
> application. <br>
My bad. Agree, that a serious error on my side.</p>
<p>>If an application wants to use multiple CPUs, then the<br>
> author of the application should write a threaded application.<br>
><br>
But how do you achieve that if your application is restricted without a container that is only single kernel threaded?<br>
> There is certainly research into making runtimes and languages that<br>
> can automatically make some parts of the code run in parallel, but that<br>
> isn't something you are likely to see in current production systems.<br>
><br>
That seem to be the case</p>
<p>> So if your application written in java creates multiple threads, then<br>
> it will use multiple CPUs just fine.<br>
><br>
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.</p>
<p>That's what I am observing on both openjdk and sun Java. </p>
<p>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?<br>
> --<br>
> Len Sorensen<br>
> --<br>
William <br>
> The Toronto Linux Users Group. Meetings: <a href="http://gtalug.org/" target="_blank">http://gtalug.org/</a><br>
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns<br>
> How to UNSUBSCRIBE: <a href="http://gtalug.org/wiki/Mailing_lists" target="_blank">http://gtalug.org/wiki/Mailing_lists</a><br>
</p>
</blockquote></div>