Re: Forcing a thread to use a specific processor?
- From: "Peter Olcott" <NoSpam@xxxxxxxxxxxxx>
- Date: Tue, 10 Jul 2007 21:14:27 -0500
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in
message news:dp1793htedjrlmjqtc2tlecgnrodouipcg@xxxxxxxxxx
SetThreadAffinityMask. You can check this out with my
Thread Affinity Explorer that you
can download from my MVP Tips site.
Generally, binding a thread to a particular processor will
overall result in poorer
performance than if you just let the scheduler choose the
processor, because it means that
it will be forced to wait if that processor is busy, even
if other processors are idle.
One technique that is used to improve user responsiveness
(as opposed to program
performance or system performance) is to allow the main
GUI thread to run on any
processor, but the worker threads to run on any processor
but procesor 0 (the low-order
bit of the mask), and then boost the priority of the
worker threads. This will cause the
scheduler to favor your threads, but not make the GUI
sluggish, because the GUI (and other
normal threads) will compete for CPU0 while the worker
threads consume CPU1..n.
joe
That sounds like good advice. Is there any way that I can
dedicate one processor to the exclusive use of one or more
of my threads?
On Mon, 9 Jul 2007 22:18:59 -0500, "Peter Olcott"
<NoSpam@xxxxxxxxxxxxx> wrote:
Now that we have dual core and quad core processors isJoseph M. Newcomer [MVP]
there
an easy way to force a thread to use a particular one of
these core processors in Windows XP or Vista?
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: Forcing a thread to use a specific processor?
- From: Joseph M . Newcomer
- Re: Forcing a thread to use a specific processor?
- References:
- Forcing a thread to use a specific processor?
- From: Peter Olcott
- Re: Forcing a thread to use a specific processor?
- From: Joseph M . Newcomer
- Forcing a thread to use a specific processor?
- Prev by Date: Re: Memory leak with CAsyncSocket::Create
- Next by Date: RegQueryValueEx retrieved only one letter
- Previous by thread: Re: Forcing a thread to use a specific processor?
- Next by thread: Re: Forcing a thread to use a specific processor?
- Index(es):
Relevant Pages
|