Forum     

Go Back   Digit Technology Discussion Forum > Community > Tutorials
Register FAQ Calendar Mark Forums Read

Tutorials This section offers tutorials and How to's on just about anything related to computers and IT. Note: All tutorials are courtesy the posters and not verified by Digit


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 23-11-2006, 10:48 PM   #1 (permalink)
The Devil
 
blackpearl's Avatar
 
Join Date: Feb 2006
Location: 0x02AE88C6FF
Posts: 983
Lightbulb CPU Affinity: Improve your multitasking


What is CPU Affinity?

Simply stated, CPU affinity is the tendency for a process to run on a given CPU as long as possible without being moved to some other processor. When we run an application on a dual-core processor, usually both the cores get used depending on whether the application is multi threaded or not and how efficiently Windows distributes the threads between the 2 cores.

Its possible to take the control on your hands by assigning different applications to different cores so that they run only on the assigned core. By doing this you can assign one application to one core and another application to the other core, so that you can multitask and none of the 2 application interfere with each other. This comes handy when you want to say, rip a DVD and play a game at the same time. By assigning both the DVD ripping program and the game to seperate cores you can play your game with ease without having to worry about game lagging or low FPS.

Changing CPU affinity is easy.

1. First launch the program you want to change CPU affinity of.
2. Open Task Manager and then click on the Process tab.
3. Locate the application from the list and right-click, and then click Set Affinity
4. Now uncheck the corresponding box of whichever CPU you don't want the program to run on.

This method can be a bit difficult to assign CPU affinity to games because you have to run the game for the process to appear on the task manager's list, and once the game loads, the task manager disappears. There is workaround to this problem. For this download a small utilty called imagecfg.exe (24KB only)

1. First copy this tool to the game folder.
2. Now make a backup of the executable file of the game. Just copy it to some safe location. This is important.
3. Open command prompt and go to your game folder and type

imagecfg -a 0x1 game.exe (suppose the game file is game.exe)

Done. This will patch the game file so that it will run always on Core1. To assign it to core 2 type:

imagecfg -a 0x2 game.exe

Here are some screenshots:


A DivX encoder running without assigning CPU. Watch both cores in action.




The same encoder running after assigning it to Core1. See core2 lying idle.

Happy multitasking
blackpearl is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 23-11-2006, 10:57 PM   #2 (permalink)
Loading . . . please d'nt
 
CINTEL ENTRINO's Avatar
 
Join Date: Aug 2006
Location: IMC
Posts: 236
Default Re: CPU Affinity: Improve your multitasking

GUD INKO THERE THNX
CINTEL ENTRINO is offline  
Old 24-11-2006, 12:07 AM   #3 (permalink)
Apprentice
 
optumsprime's Avatar
 
Join Date: Nov 2006
Location: CYBER WORLD
Posts: 61
Thumbs up Re: CPU Affinity: Improve your multitasking

more..
__________________
C2D E6600
ASUSP5W DH DELUXE (975 CHIPSET)1GB DDR-2 800 MHZ KINGSTON
XFX 7600 GT DDR-3
500 GB HARD DISK WD
ZEBRONIC CABINET 550 W SUPPLY
19 Inch CRT FLAT SAMSUNG
SONY DVD WRITER
optumsprime is offline  
Old 24-11-2006, 03:23 PM   #4 (permalink)
ax3
Cool as a CUCUMBAR ! ! !
 
ax3's Avatar
 
Join Date: Dec 2003
Posts: 5,052
Default Re: CPU Affinity: Improve your multitasking

nice info ........ will try it .........
ax3 is offline  
Old 24-11-2006, 07:26 PM   #5 (permalink)
Broken In
 
overclocker's Avatar
 
Join Date: Oct 2006
Location: intel inside
Posts: 115
Default Re: CPU Affinity: Improve your multitasking

Nice tutorial keep it up..
overclocker is offline  
Old 25-11-2006, 10:07 PM   #6 (permalink)
Broken In
 
kirtan's Avatar
 
Join Date: Sep 2006
Location: Kernel
Posts: 133
Default Re: CPU Affinity: Improve your multitasking

Thanks Man.Nice Info!!
__________________
Water can flow or it can crash.Be Water my friend.
kirtan is offline  
Old 26-11-2006, 11:55 AM   #7 (permalink)
-- No Easter Eggs here --
 
hemant_mathur's Avatar
 
Join Date: Apr 2006
Location: Front of my pc
Posts: 949
Default Re: CPU Affinity: Improve your multitasking

Nice info
__________________
E6850 3.0 Ghz, 4gb 667 Mhz RAM, Asus p5n Esli Mobo, Nvidia 8600GT 512mb, 400gb WD HDD, Samsung Syncmaster 920NW, Vista x64
hemant_mathur is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Tenida
- by clinton

Advertisement




All times are GMT +5.5. The time now is 03:42 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2