kkylheku at gmail.com
Fri Jun 5 20:15:00 CEST 2009
On 2009-06-05, Vend <vend82 at virgilio.it> wrote:
> On Jun 4, 8:35 pm, Roedy Green <see_webs... at mindprod.com.invalid>
>> On Thu, 4 Jun 2009 09:46:44 -0700 (PDT), Xah Lee <xah... at gmail.com>
>> wrote, quoted or indirectly quoted someone who said :
>> >• Why Must Software Be Rewritten For Multi-Core Processors?
>> Threads have been part of Java since Day 1. Using threads complicates
>> your code, but even with a single core processor, they can improve
>> performance, particularly if you are doing something like combing
>> multiple websites.
>> The nice thing about Java is whether you are on a single core
>> processor or a 256 CPU machine (We got to run our Athena Integer Java
>> spreadsheet engine on such a beast), does not concern your code.
>> You just have to make sure your threads don't interfere with each
>> other, and Java/the OS, handle exploiting all the CPUs available.
> You need to decompose your problem in 256 independent tasks.
> It can be trivial for some problems and difficult or perhaps
> impossible for some others.
Even for problems where it appears trivial, there can be hidden
issues, like false cache coherency communication where no actual
sharing is taking place. Or locks that appear to have low contention and
negligible performance impact on ``only'' 8 processors suddenly turn into
bottlenecks. Then there is NUMA. A given address in memory may be
RAM attached to the processor accessing it, or to another processor,
with very different access costs.
More information about the Python-list