How do I disable hyperthreading for certain programs.

Shawn

Lifer
Apr 20, 2003
32,236
53
91
For some reason WinTV randomly crashes with hyperthreading enabled. When disabled it doesn't crash on me. On their website they say you can disable hyperthreading for WinTV by opening the task manager, selecting set affinity and unchecking CPU 1. This works but it does not save the settings when you exit the program. Is there anyway to make windows remember these settings?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Create a small batch file to start WinTV with the 'start' command, I believe start lets you set affinity, priority, etc.

And you should ask them why they don't just fix their program. SMP should not cause a program to crash, no matter how many CPUs are available.
 

skriefal

Golden Member
Apr 10, 2000
1,424
3
81
That would require that they hire a developer who actually knows what he/she is doing in regards to multithreaded applications. Most developers don't understand how to write proper multithreaded applications, thus developers who do understand this aren't exactly inexpensive. Hmm... perhaps I should brush up on my multithreaded development skills -- I sense a large market looming just over the horizon... :)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Dealing with multihreaded development is irrelevant, if the app is multithreaded it can still crash on UP boxes but if it's single threaded it'll still work fine on SMP boxes.
 

skriefal

Golden Member
Apr 10, 2000
1,424
3
81
Yep. Multi-threaded applications can have problems even on a single-processor system. But the potential for problems increases when they are run on multi-processor or hyperthreaded systems. Ideally, any multi-threaded applications should be fully tested on multi-processor systems to weed out the greatest number of threading bugs. But it seems that usually doesn't happen.

Back to the OP's question... it seems that the start command does not provide options to set affinity. But there's a command-line program that came with the Windows 2000 Resource Kit that allows you to force a program to run in uni-processor mode, which should accomplish the same thing. The program is called imagecfg.exe. You should be able to find a copy of the program on an NT 4.0 CD or the Win2k Resource Kit CD. I also found a link here...
 

Shawn

Lifer
Apr 20, 2003
32,236
53
91
Originally posted by: skriefal
Yep. Multi-threaded applications can have problems even on a single-processor system. But the potential for problems increases when they are run on multi-processor or hyperthreaded systems. Ideally, any multi-threaded applications should be fully tested on multi-processor systems to weed out the greatest number of threading bugs. But it seems that usually doesn't happen.

Back to the OP's question... it seems that the start command does not provide options to set affinity. But there's a command-line program that came with the Windows 2000 Resource Kit that allows you to force a program to run in uni-processor mode, which should accomplish the same thing. The program is called imagecfg.exe. You should be able to find a copy of the program on an NT 4.0 CD or the Win2k Resource Kit CD. I also found a link here...

Awesome! That worked great. Thanks a lot!