Re: Best way to design multithreading application
- From: Peter Duniho <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Thu, 27 Sep 2007 13:23:15 -0700
anonymous wrote:
Threading will improve performance on a single processor machine if your threads are working on disparate resources.
That's right. That would be an example of an algorithm that can be parallelized, which I mentioned. My specific example was of one that could do CPU-intensive work in parallel, but it applies to any situation in which mutually independent tasks are using unrelated resources.
[...] I've noticed that in your problem you're reading
from the hard drive and processing the data, so you should see a performance boost, becuase you can have the cpu processing the data while your reading more data in. That being said I don't know if you'll see the performance boost you're looking for.
It's not my problem. It's Dave's problem.
As for whether threading will improve performance, we don't have the information to know for sure if it will. However, from his original post it does not sound like there's any significant CPU work involved. He's essentially got a chain of i/o, each link dependent on the previous. Since a given link in the chain can't do anything with the data until the previous link is done with it, threading isn't going to improve throughput.
Which is not to say it's not potentially useful. The use of threads can address other issues, such as allowing the UI to remain responsive. It's just not clear from the problem description that threading is going to help overall throughput.
Pete
.
- Follow-Ups:
- References:
- Best way to design multithreading application
- From: Dave
- Re: Best way to design multithreading application
- From: Peter Duniho
- Re: Best way to design multithreading application
- From: anonymous
- Best way to design multithreading application
- Prev by Date: Re: Best way to design multithreading application
- Next by Date: Re: Best way to design multithreading application
- Previous by thread: Re: Best way to design multithreading application
- Next by thread: Re: Best way to design multithreading application
- Index(es):
Relevant Pages
|