Setting Affinity on multi processor machines 
Author Message
 Setting Affinity on multi processor machines

Does anyone know how to set the affinity ( i.e. which processor an app uses)
of an exe from within code (standard MFC MDI app). I am having problems with
applications, using ODBC, intensively stopping unless it is only running on
one processor.

Thanks
John Makin

----------------------------------------------------------------------
   John Makin - Principal Engineer





----------------------------------------------------------------------
   OSCAR FABER                               VOICE: +44 181 784 5772
   Marlborough House,
   Upper Marlborough Road,                   FAX:   +44 181 784 5700
   St. Albans,
   Herts,
   ENGLAND,
   AL1 3UT
----------------------------------------------------------------------



Sun, 10 Sep 2000 03:00:00 GMT  
 Setting Affinity on multi processor machines

Quote:

>Does anyone know how to set the affinity ( i.e. which processor an app uses)
>of an exe from within code (standard MFC MDI app). I am having problems with
>applications, using ODBC, intensively stopping unless it is only running on
>one processor.

See SetProcessAffinityMask()


Sun, 10 Sep 2000 03:00:00 GMT  
 Setting Affinity on multi processor machines

Quote:

> Does anyone know how to set the affinity ( i.e. which processor an app
> uses)
> of an exe from within code (standard MFC MDI app). I am having
> problems with
> applications, using ODBC, intensively stopping unless it is only
> running on
> one processor.

When directly asked about this subject, one Microsoft propeller head
stated "Why would anyone want to do that?" This from the same people
that stated "Why would any program create more than a couple threads?
Aren't they only good for printing in the background?"

Theoretically you shouldn't have to worry about this. I bet you are
possibly having a problem with threads more than with processor
affinity. MFC in general and their database classes in particular
explode when you try to do anything with multiple threads. And for Gosh
sake, don't you dare try to access a database on any thread outside of
the user interface thread.




Fri, 15 Sep 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Setting Affinity on multi processor machines

2. problems with multi-processors machine

3. How do I set the affinity ?

4. Multi record sets and multi databases

5. How to set up multi-developer, multi-executable software system

6. Multi record sets and multi databases

7. C pre-processor to produce machine-specific assembler code

8. Machine Speed and Processor for PC's

9. thread creation on dual processor machine

10. CCriticalSection and CSingleLock problem on dual-processor machine?

11. Is VC 5.0 debugger multi-processor proof

12. Multi-Threading in Dual Processor System

 

 
Powered by phpBB® Forum Software