Dual core CPU, .NET & Threads

K

Kevin

Hi
I am writing an application for a client that (mostly) have dual core
desktop machines.

I have a DB query that returns a large amount of data that I will then
need to manipulate on the client side.

What I would like to know is whether it is possible to split my data
into 2, and then start two threads to do the manipulation.

Will .Net/Windows XP automatically assign each thread to a different
core, thus substantially decreasing the time that is taken to
manipulate the data? I.e. will it work (almost) twice as fast?

Thanks
Kevin
 
D

Daniel O'Connell [C# MVP]

Kevin said:
Hi
I am writing an application for a client that (mostly) have dual core
desktop machines.

I have a DB query that returns a large amount of data that I will then
need to manipulate on the client side.

What I would like to know is whether it is possible to split my data
into 2, and then start two threads to do the manipulation.

Will .Net/Windows XP automatically assign each thread to a different
core, thus substantially decreasing the time that is taken to
manipulate the data? I.e. will it work (almost) twice as fast?

It is likely, but not definite. Windows will schedule threads as efficently
as it can, but there is no guarentee that you will always get both threads
running at once. However, for heavy computations it'll likely increase your
speed assuming there are no other issues and its pretty likely both will run
simultaneously. I'd recommend splitting it and seeing how it goes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top