R: How to disable dual cpu automatically before launching an application

From MSDN, Platform SDK:

SetProcessAffinityMask
The SetProcessAffinityMask function sets a processor affinity mask for the
threads of the specified process.

A process affinity mask is a bit vector in which each bit represents the
processor on which the threads of the process are allowed to run.

The value of the process affinity mask must be a proper subset of the mask
values obtained by the GetProcessAffinityMask function.

BOOL SetProcessAffinityMask(
HANDLE hProcess, // handle to process
DWORD_PTR dwProcessAffinityMask // process affinity mask
);

-----Messaggio originale-----
Da: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]Per conto di xxxxx@matrox.com
Inviato: martedì 3 aprile 2001 12.34
A: NT Developers Interest List
Oggetto: [ntdev] How to disable dual cpu automatically before launching
an application

Hi,

I have an application that does not behave well when ran on dual cpu
systems. I am looking for a simple workaround to disable one cpu just prior
to lauching this application (ie: a batch file, or some other trick).

I have considered other alternatives like:

  1. insert /onecpu in the boot.ini line => but this disables dual cpu for
    all app’s which is not desired.

  2. Start the app in question - do “ctrl-alt-del”, select the process, and
    right click to use the “set affinity” to disable one cpu => does not work
    since the app is already started and damage is already done.

I would appreciate any suggestions.

Thanks!


You are currently subscribed to ntdev as: xxxxx@tin.it
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

use SetProcessAffinityMask
----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Tuesday, April 03, 2001 12:34 PM
Subject: [ntdev] How to disable dual cpu automatically before launching an
application

> Hi,
>
> I have an application that does not behave well when ran on dual cpu
> systems. I am looking for a simple workaround to disable one cpu just
prior
> to lauching this application (ie: a batch file, or some other trick).
>
> I have considered other alternatives like:
>
> 1) insert /onecpu in the boot.ini line => but this disables dual cpu for
> all app’s which is not desired.
>
> 2) Start the app in question - do “ctrl-alt-del”, select the process, and
> right click to use the “set affinity” to disable one cpu => does not work
> since the app is already started and damage is already done.
>
> I would appreciate any suggestions.
>
> Thanks!
>
> —
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

_________________________________________________________

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Forcing an application to run on 1 CPU is not advisable.

Regards,
Satish K.S

Hi,

I have an application that does not behave well when ran on dual cpu
systems. I am looking for a simple workaround to disable one cpu just
prior
to lauching this application (ie: a batch file, or some other trick).

I have considered other alternatives like:

  1. insert /onecpu in the boot.ini line => but this disables dual cpu for
    all app’s which is not desired.

  2. Start the app in question - do “ctrl-alt-del”, select the process, and
    right click to use the “set affinity” to disable one cpu => does not work
    since the app is already started and damage is already done.

I would appreciate any suggestions.

Thanks!


You are currently subscribed to ntdev as: xxxxx@yahoo.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com


You are currently subscribed to ntdev as: xxxxx@aalayance.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com