Quite a lot of advantages, mainly performance oriented
macbeth said:
What are the advantage of dual core over single core?
Well, we have to start out w/ how OS run programs, & on Windows? The "smallest atomic unit of execution" is a "thread" (even Linux/UNIX & other OS shifted to this, vs. process forks for instance)... which is, in & of itself, a "lightweight" child process of a parent one (main thread).
This paradigm is "cheaper", resources-wise, for the OS to use, than forking entire process (as UNIX did for years).
That said - if you open up taskmgr.exe (taskmanager), & go to its PROCESS tab, & then its VIEW menu, SELECT COLUMNS submenu, tick off the THREADS column as visible.
You SHOULD note, that a GOOD 90-100% of what you're running uses 2-N threads... which is good, because modern OS' process scheduling portions of their kernels' can take threads (child ones) & spin them off to a least used processor/cpu, getting MORE done @ once (think of it as picking up cards that are scattered with one hand, vs. 2).
This shows you that the OS is ready, as well as most of the programs you run no doubt (most will bear more than 1 single thread, odds are).
Therefore, you don't REALLY need SetProcessAffinity (for single threaded code to run specifically on a certain CPU) or SetThreadMaskAffinity (for multithreaded code to do the same) type EXPLICIT smp-ready API calls usage (this has its overheads too, on init. load, detecting CPU's - but less later because it does not stress the process scheduler to send code to CPU's)... the process scheduler will send threads to the LEAST used CPU when needed, getting MORE done @ once per CPU cycle.
macbeth said:
Will i see much performance gain? If so how much performance gain? Double the preformcance or just abit faster. And what kind of task or application benefit from dual core. Most important of all will dual core benefit gaming?
It will get you gains, in that MAINLY, you will be able to multitask a LOT better! BUT, also at the individual APPLICATION level too, if threads are used right (again, the Quake 4 SMP example... it's OUTSTANDING!)
(E.G.-> Right now, I am watching WinTV32, recompiling a Delphi app, surfing here talking to you, & running 22 other process as smooth as glass all the while (including SETI@Home @ HIGH CPU priority across two diff. CPU's via Affinity settings via taskmgr.exe)).
I have been up to 5 times that amount in process' running, & Dual or more/SMP (& to an extent HyperThreaded rigs even by Intel) run a lot "smoother" multitasking than single CPU rigs do...
Another one, one you MAY appreciate more, is Quake 4 SMP! It has shown up to 87% gains vs. running std. Quake 4 single-threaded model...
APK
P.S.=> I've been using Dual CPU/SMP machines since, oh, the Pentium I days (started out with Pentium I 233mmx's) & have had them ever since thru every OS & processor generation... & I've been writing multithreaded code since 1996 or so. It's ALL in how efficiently you design using threads, some things however, are NOT meant for it & are too "linear" in nature to benefit from them, e.g.:
A=A+B
B=A-1
C=A
B can't complete itself, until it gets A's result (&, vice-a-versa, + all the way to C result too, may not be BEST example, but point is here)...
This is not a case where I would put A's & B's code on diff. threads to get C... because A has to wait on B, etc. - et all...
Commonly shared data is another - something called a "race condition" can result if you put 2 threads onto the same datablock to process, so you have to watch it.
It's "better" to do 2 - N DIFFERENT tasks with diff. data - as in the Quake 4 SMP example, I would wager they put Sound processing on 1 thread, the main body thread is the game animation loop on its own thread, & networking code on yet another thread for example... safe & there is little arguing with the results (up to 87% increases!!!).
Above all - Multiple thread code is better on SMP/Dual or more CPU systems, & actually has MORE OVERHEADS on it on single cpu rigs, & runs SLOWER on them because of it!
However, again, do note - most of what you run in APPS, and certainly your OS (Linux, Unix, Windows, all ready for it now)? IS MULTITHREADED & has been for years... taskmgr.exe above can & should have showed you this, & if done right? The Quake 4 SMP gains (up to 87%, which IS huge imo) certainly does... apk