Set Affinity, and How to use it to Make Stubborn Games Work on Multi-core Sytems
The fact is, games that predate the dual core in the gaming computer were rarely programmed to use them. Some of these later titles may have taken advantage of the Pentium 4's hyper-threaading, but these likely found remedy in better core management. But where does that leave such old favorites like Silent Hill 2, who simply cannot function on multiple cores? Well, it pretty much means running them on multiple cores is impossible. Note that this doesn't mean you can't run them on a dual, triple, quad or six core, or a system with hyperthreading--it just means you'll have to force it to run on one, and only one, of your processor's many cores.
A current processor works by breaking a running program, or executable, into smaller segments. These segments are called "threads." The smaller threads are run simultaneously, often by the different working parts of the processors, the "cores." When two threads or more threads are run, it is referred to as "multi-threading," which is what a multi-core processor is built for. Windows 7, and its predecessor Windows Vista, attempt to help the processor manage these threads more efficiently, while Windows XP was forced to use a special driver to make multi-threading work. Unfortunately, games that were built before the concept of multi-threading cannot always be helped by the operating system, and that's when the freezing and crashing happens.
However, Windows has an easy fix for this. The fix is found through the Task Manager after it gains administrator privileges, through an option called "Set Affinity." Set Affinity allows you to choose which cores a processor runs on. However, it can only do this when the executable in question is running. Simply follow the instructions below.
It's been too long since I used XP, but if I'm not mistaken the ALT+TAB shortcut may not work. That's not necessarily an issue. When you run a game that cannot handle threading, press Ctrl+Alt+Delete as quickly as you can. This should bring up the Task Manager. Because UAC was not created until Vista, you can skip the step about obtaining administrator privileges. Instead, find the executable in question, for example sh2pc.exe, and right click it. If you have the proper driver, you should see Set Affinity, just below the Set Priority option. Click it.
Now, depending on your processor, you should have anywhere between 2 to 14 cores. These will be listed starting with CPU 0. Uncheck all of them but CPU 1. Close out task manager and start the game. Assuming your game is compatible with an x84 operating system (if it was not, it shouldn't have been able to install), and assuming you do not need any patches, your game should run smoothly.
For the most part, it's the same as XP. Here, as soon as the game runs, press ALT+Tab. This should take to you Desktop immediately; if not, press it again until you are on the desktop. Now, right click your taskbar. If UAC is running, you can just right click the executable and choose set affinity. If not, press the "Show Processes from All Users" button. You'll get a UAC prompt informing you that Task Manager is trying to obtain the necessary privileges--accept it. Again, right click, set affinity, and uncheck all but CPU 1. Assuming the game is Vista/7 ready (and no patches are needed), your game should run smoothly.
What happens if it still doesn't work?
Unfortunately, this may happen. Some very old games just can't handle current processor architectures. Most of these games, though, can't run on modern operating systems. If it doesn't work, you might have a rare exception, but chances are you shouldn't run into that problem.
Later on, I'll add more advanced uses of the Set Affinity program.
- 23 December 2011 - 03:10 AM