MultiThreading in java working in MultiProcessor
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   yugandhar_yandapalli
Posted On:   Wednesday, July 24, 2002 06:01 AM

I have an application written in java


I am creating a pool of threads and executing a process on each thread.


If i create a single thread on single processor system and give the process on it, it is taking 30 sec.

if i create two threads on dual processor system and giving the process on each thread, it is taking 54 sec.


I want to know how the dual processor system works in case of multi threading.


Thanks for the help.

Re: MultiThreading in java working in MultiProcessor

Posted By:   Simon_Ablett  
Posted On:   Wednesday, July 24, 2002 11:47 AM

Are your threads heavily IO dependant? I guess you would only experience a benefit from a multi-processor system if your threads were computationally as opposed to IO intensive. Otherwise you may end up with the two processors (threads) competing for the same resources. In a single processor system this might not be as apparent because the threading is implemented through timeslicing (i.e. allocating slots of CPU time to each thread in time) so no two threads will actually be running at any single point in time.

Regards.
About | Sitemap | Contact