Hello!

How can I use only one processor to run my application on multy-processor
machine?

Thank you,
Vitaly Sedov

Re: Use only one processor on multy-processor machine by Nnamdi

Nnamdi
Wed Jun 30 03:11:11 CDT 2004

I thought windows handled the assignment of processor time? Maybe if the
process only operates in one thread it would only use one processor.



Re: Use only one processor on multy-processor machine by Manoj

Manoj
Wed Jun 30 05:46:41 CDT 2004

Hi,

I suppose you can set the ProcessorAffinity property of the process
which owns that thread. But note that this would apply to all the threads in
that process.
Process.GetCurrentProcess.ProcessorAffinity = <Value, a bitmask>.

It is recommended that you correctly evaluate this option. This has direct
performance implications on your app.
--
HTH,
Manoj G
[MVP , Visual Developer - Visual Basic ]
http://msmvps.com/manoj/



"Nnamdi Onyeyiri" <theeclypse@hotmail.com> wrote in message
news:%23kFfKnnXEHA.2972@tk2msftngp13.phx.gbl...
> I thought windows handled the assignment of processor time? Maybe if the
> process only operates in one thread it would only use one processor.
>
>



Re: Use only one processor on multy-processor machine by Stephan

Stephan
Wed Jul 07 09:23:01 CDT 2004

Hello Vitaly,

> How can I use only one processor to run my application on multy-processor
> machine?

you can use the Win32 API call "SetProcessAffinityMask" (I think it's
call alike) to have your application handled by a specific processor.

Have a look into the MSDN library.

Regards,
Stevie