View Single Post
  #116 (permalink)  
Old 08-30-2007, 05:22 AM
prasannavigneshr prasannavigneshr is offline
D-Web Incredible
 
Join Date: Feb 2007
Posts: 1,321
prasannavigneshr is on a distinguished road
Send a message via MSN to prasannavigneshr
Default Re: Windows Vista Tips & Tricks

Start an Application Assigned to a Specific CPU in Windows Vista

Windows Vista has an option that lets you start an application and set the CPU affinity, which assigns the application to run on a specific CPU in a dual-core system.

To start an application you have to pass the affinity flag to the start utility in the command prompt. For instance, if you wanted to start notepad assigned to CPU, you could use the following command:

Quote:
c:\windows\system32\cmd.exe /C start /affinity 1 notepad.exe
You can see in task manager that the process is only assigned to CPU 0



To start a process on CPU 0, use the following command switch:

Quote:
/affinity 1
Quote:
/affinity 2
You can use a number up to the number of CPU cores or CPUs in your system. The affinity is essentially CPU core # + 1, so /affinity 5 would use CPU 4.

You can almost modify the shortcut for an item to make it run on the specific CPU, by just prepending the full "c:\windows\system32\cmd.exe /C start /affinity 1 " onto the shortcut target. The only drawback to this approach is that the command prompt window will briefly flash on the screen.
__________________
Prasanna Vignesh
MCPD | Web Developer
Reply With Quote