Re: How to use power of Dual/ Quad core Processors in Applet?
- From: Lew <lew@xxxxxxxxxxxxxxxx>
- Date: Sat, 21 Jul 2007 11:27:29 -0400
Roedy Green wrote:
So long as you have multiple threads, the multiple processors will be
automatically exploited. The JVM does not assign a thread to a
processor. On each slice the OS just gives the highest priority
waiting thread to the first available processor.
pkriens wrote:
Are you sure about this? Due to the problems with multi-core memory
models I would expect a lot of Java code to fail due to lack of proper
synchronization (which also handles memory synchronization between
CPUs).
Of what "multi-core memory models" do you speak?
Java has a well-defined memory model that the JVM on any system must follow. How is its memory model subject to "the problems with multi-core memory models"? (Be specific and precise.)
Why would you expect "a lot of Java code to fail due to lack of proper synchronization" in greater proportion on multi-core systems than on single-core systems, given that both have to follow the Java Memory Model?
Do you blame Java?
nebulous99@xxxxxxxxx wrote:
Threaded code that doesn't synchronize properly will experience buggy
behavior even on single-CPU systems. Threaded Java code that does
synchronize properly should not experience buggy behavior on multi-CPU
systems ... [more accurate and cogent information followed]
Exactly. The memory model is the same. Concurrent programming is tricky. If pkriens were to actually study it, they might find that the Java Memory Model exists specifically to address issues that come up on multi-CPU systems but not on single-core systems.
So whether Roedy is sure about his assertion or not, I sure am.
--
Lew
.
- References:
- How to use power of Dual/ Quad core Processors in Applet?
- From: Sanny
- Re: How to use power of Dual/ Quad core Processors in Applet?
- From: Roedy Green
- Re: How to use power of Dual/ Quad core Processors in Applet?
- From: pkriens
- Re: How to use power of Dual/ Quad core Processors in Applet?
- From: nebulous99
- How to use power of Dual/ Quad core Processors in Applet?
- Prev by Date: Re: multiple threads close, wait, join
- Next by Date: Re: Java and avoiding software piracy?
- Previous by thread: Re: How to use power of Dual/ Quad core Processors in Applet?
- Next by thread: Re: How to use power of Dual/ Quad core Processors in Applet?
- Index(es):
Relevant Pages
|