Multi-Threading in Dual Processor System 
Author Message
 Multi-Threading in Dual Processor System

Hi,

I am writing a program that has 2 threads, the main thread and another one
that process data coming from the communication port.

As a dual processor system with Windows NT 4.0 workstation is used, how can
I make use of them by allocating the 2nd thread to the 2nd Processor,
leaving the main thread in the first processor?

Please advise.
Wilson Ng



Tue, 21 Jan 2003 03:00:00 GMT  
 Multi-Threading in Dual Processor System
Wilson:

The operating system will do this automatically.

HTH,

David Wilkinson

===============

Quote:

> Hi,

> I am writing a program that has 2 threads, the main thread and another one
> that process data coming from the communication port.

> As a dual processor system with Windows NT 4.0 workstation is used, how can
> I make use of them by allocating the 2nd thread to the 2nd Processor,
> leaving the main thread in the first processor?

> Please advise.
> Wilson Ng



Tue, 21 Jan 2003 03:00:00 GMT  
 Multi-Threading in Dual Processor System
David,

Is there any way where the programmer can specifically assign threads to the
processors?

Wilson.

Quote:

>Wilson:

>The operating system will do this automatically.

>HTH,

>David Wilkinson

>===============



Tue, 21 Jan 2003 03:00:00 GMT  
 Multi-Threading in Dual Processor System

Quote:
> As a dual processor system with Windows NT 4.0 workstation is used,
how can
> I make use of them by allocating the 2nd thread to the 2nd Processor,
> leaving the main thread in the first processor?

Try
SetThreadAffinityMask(...);

Rene

Sent via Deja.com http://www.deja.com/
Before you buy.



Tue, 21 Jan 2003 03:00:00 GMT  
 Multi-Threading in Dual Processor System

SetThreadAffinityMask (hard affinity)
SetThreadIdealProcessor (soft affinity)

--

Jan Bares
(remove no.spam from my email address)
JPCAD Graphics Engine developer, surf to http://www.antek.cz



Tue, 21 Jan 2003 03:00:00 GMT  
 Multi-Threading in Dual Processor System
Why not NT handle this sort of thing? If you don't trust NT to do it
right, why use NT at all?

--
James Antognini
IBM Watson Research



Sun, 26 Jan 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Dual Processor and Multi-thread

2. Dual-processor and multi-threading

3. 2 threads using 50% of dual processor system

4. Distribution of processes on dual processor system

5. Thread on Dual Processor

6. Thread on Dual Processor

7. thread creation on dual processor machine

8. Thread on Dual Processor

9. std::ostringstream problem on a multi-processor system

10. Dual Processor Code problem

11. VC & dual processor

12. dual processors and access violation

 

 
Powered by phpBB® Forum Software