3

I’m experiencing a strange issue in Windows XP. On bootup, any processes spawned by the system (services, autorun programs, etc.) are set to use both of the CPU’s threads. Explorer however, and any programs it spawns are set to use only “CPU 0”.

I have tried setting the affinity of explorer.exe to both threads, but it still uses only one on the next boot. Somewhere, sometime, somehow, the setting for explorer.exe was modified and does not seem to want to be changed back/saved.

Don’t bother mentioning msconfig (this is XP), or Task Manager or Process Lasso because I am not asking about setting the affinity during runtime, I’m asking where Windows stores the affinity settings.

Synetech
  • 68,243
  • 36
  • 223
  • 356
  • CPU 0 is usually for core #1 and try getting Core Temp application to monitor cpu temps, usage and Freq. – FiKo Aug 12 '12 at 00:08
  • 1
    @ProFiKo, not that it matters or makes a difference, but there are not cores in this, it’s a P4 HT. And I’m not asking about any of the information you mentioned; I’m trying to find out where Windows saves the setting (as I said repeatedly). – Synetech Aug 12 '12 at 00:12
  • Are you with 32Bit or 64Bit version? – Zuul Aug 12 '12 at 00:15
  • @Zuul, 32-bit; but that shouldn’t matter (other than the root-branch in the registry). – Synetech Aug 12 '12 at 00:22
  • http://smallvoid.com/article/winnt-process-affinity.html - options there for setting the affinity – SeanC Aug 14 '12 at 18:59
  • @SeanCheshire, that page has nothing about how/why a process’ (particularly Explorer’s) affinity can/may be previously set/saved, but the thing about modifying the file is interesting and I will check that. Plus, the link to the DOS subsystem page is useful and may help diagnose my NTVDM issue. – Synetech Aug 14 '12 at 19:58
  • it references the setting that is held in the header of the exe file, using imagecfg.exe – SeanC Aug 14 '12 at 20:05
  • @Yes, I know. Of course `explorer.exe` is unlikely to be modified for no reason, which is why they specifically talk about WFP in the same section. – Synetech Aug 14 '12 at 20:07

2 Answers2

5

It could be a third party shell extension like in this blog post. Some other application on your machine installed an extension that runs inside of explorer and it is setting the CPU affinity.

I don't believe that there is anything built into Windows that saves CPU affinity settings.

Glorfindel
  • 4,089
  • 8
  • 24
  • 37
shf301
  • 7,910
  • 1
  • 28
  • 25
  • Correct. Affinity settings are normally automatically set to the parent process's affinity, and initial system processes always have full affinity whereas initial user processes have affinity depending on the user's quota settings (usually full). There must be a third-party application somewhere modifying the defaults immediately after boot. – Thomas Aug 12 '12 at 02:16
  • Nice link, it’s exactly what I’m looking for. I’ll try disabling everything to see if it still happens.     *> I don't believe that there is anything built into Windows that saves CPU affinity settings.*   That’s what I figured; I can find no information about affinity being persistent (though perhaps there should be). – Synetech Aug 12 '12 at 02:55
1

CPU affinity can be set in a .exe. There was a program called imagecfg that came with an old version of the Resource Kit. It allowed you to set the affinity mask on an exe, or set it to "uniprocessor" (which meant "pick any processor"), set the large address aware flag, and other things.

This is not done by default for any exe's supplied with Windows. But something you installed might have done this to explorer.exe.

As shf301 said, it is also possible that a shell extension has done this to your instance of explorer. You can peruse (and experimentally disable) your shell extensions with the ShellExView tool from NirSoft: http://www.nirsoft.net/utils/shexview.html

Jamie Hanrahan
  • 23,140
  • 6
  • 63
  • 92