It's been a while so don't throw rocks.
There are lots of potential performance issues with concurrent execution. Most involve scarce resources, be they shared memory, input/output streams, processor units, or just blocking for synchronization. Then there's efficiency. Semaphores & conventional locks add overhead that kills for iterative tasks. What's your code look like? Do you have anything preparing work queues or are the threads stepping on each others' feet to get their jobs done?
Here's a page from SUn on their concurrency utilities:
http://java.sun.com/j2se/1.5.0/docs/.../overview.html
Lots of strategy guides out there. Should be plenty of examples for primes in google.
__________________
There are a vast number of people who are uninformed and heavily propagandized, but fundamentally decent. The propaganda that inundates them is effective when unchallenged, but much of it goes only skin deep. If they can be brought to raise questions and apply their decent instincts and basic intelligence, many people quickly escape the confines of the doctrinal system and are willing to do something to help others who are really suffering and oppressed." -Manufacturing Consent: Noam Chomsky and the Media, p. 195
|