Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

threading in multi computer?

Status
Not open for further replies.

ajikoe

Programmer
Apr 16, 2004
71
ID
Hello,

Is threading in C# able to be handle in multi computer processor ?

Sincerely Yours,
Pujo
 
Under Windows NT/2K/XP, the unit of work that is scheduled by the operating system is the thread, not the process. So when a thread is ready to execute (not waiting on an I/O operation to complete, etc), the OS will run it on the next available CPU.

This applies for Intel Hyperthreading, as well as the forthcoming dual-core CPUs from AMD and Intel.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Hello,

Can we choose which CPU handle specific thread?

Pujo
 
As Chip has already said, your thread gets scheduled on the next available CPU. You can change the priority so that if there are a number of threads on the ready chain, yours will get scheduled first. Some OSs allow you to set a processor affinity, I don't know if XP does. Besides, apart from trying to avoid paying licenses for multi-cpu versions of software, I can't think of a good reason to tie your threads to a particular processor.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top