Click here to Skip to main content
15,918,109 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: is socket in win32 (vc++) is blocking Pin
Mark Salsbery13-Nov-06 11:30
Mark Salsbery13-Nov-06 11:30 
GeneralRe: is socket in win32 (vc++) is blocking Pin
led mike13-Nov-06 11:43
led mike13-Nov-06 11:43 
GeneralRe: is socket in win32 (vc++) is blocking Pin
Mark Salsbery13-Nov-06 8:51
Mark Salsbery13-Nov-06 8:51 
GeneralRe: is socket in win32 (vc++) is blocking Pin
vineeshV14-Nov-06 7:04
vineeshV14-Nov-06 7:04 
Questionpass_thru in hyperthreading Pin
vineeshV13-Nov-06 5:49
vineeshV13-Nov-06 5:49 
AnswerRe: pass_thru in hyperthreading Pin
James R. Twine13-Nov-06 6:00
James R. Twine13-Nov-06 6:00 
GeneralRe: pass_thru in hyperthreading Pin
Mark Salsbery13-Nov-06 6:20
Mark Salsbery13-Nov-06 6:20 
GeneralRe: pass_thru in hyperthreading Pin
James R. Twine13-Nov-06 6:39
James R. Twine13-Nov-06 6:39 
   By just calling ::CreateThread(...) on any multicore/HT system will not allocate the thread to a particular CPU/Virtual-CPU.  Normally, this is OK.  However, if you want to ensure that two threads are not waiting for a particular CPU resource, you can set the affinity (or if you want to restrict what CPUs it can run on).

   HT's virtual-CPUs are not real CPUs (and this comes from memory from a year or so ago) - they share a single execution engine on the die - this means that HTs compete for a shared resource on the die.

   They each have their own copy of an "architectural state" (like registers) but they cannot really execute (or dispatch) executions at exactly the same time.  They can decode and retire instructions independently of one another, IIRC, and this part provides a performance increase.  It still does not beat out a real multi-core system, all things being equal.

   When dealing with this on a multi-HT-CPU system, you need to allocate threads to every other CPU so that each thread ends up on its own die.  (IIRC, the virtual CPUs are allocated in order of the dies in Win32, so if you have two HT CPUs in your system, you see 4 CPUs, and CPUs 0 and 1 are on the first die/chip and 2 and 3 are on the second die/cip.  By allocating two threads to CPUs 0 and 2, they will run on different dies and thus can really execute independently and not compete for an on-die resource.

   I do not think that Windows is smart enough to do this on its own (or at least, it was not before - it might be better now), this is why some applications (even properly multithreaded ones) did not run so great on the early HT processors - the OS treated them like real CPUs.

   Peace!

-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)

GeneralRe: pass_thru in hyperthreading Pin
Mark Salsbery13-Nov-06 7:07
Mark Salsbery13-Nov-06 7:07 
GeneralRe: pass_thru in hyperthreading Pin
vineeshV13-Nov-06 6:23
vineeshV13-Nov-06 6:23 
GeneralRe: pass_thru in hyperthreading Pin
James R. Twine13-Nov-06 6:41
James R. Twine13-Nov-06 6:41 
QuestionNeed help! Unhdanled exception error in VC++ 2003 Pin
eanton8313-Nov-06 5:10
eanton8313-Nov-06 5:10 
AnswerRe: Need help! Unhdanled exception error in VC++ 2003 Pin
Mark Salsbery13-Nov-06 5:19
Mark Salsbery13-Nov-06 5:19 
GeneralRe: Need help! Unhdanled exception error in VC++ 2003 Pin
Waldermort13-Nov-06 6:01
Waldermort13-Nov-06 6:01 
GeneralRe: Need help! Unhdanled exception error in VC++ 2003 Pin
James R. Twine13-Nov-06 6:05
James R. Twine13-Nov-06 6:05 
GeneralRe: Need help! Unhdanled exception error in VC++ 2003 Pin
Mark Salsbery13-Nov-06 6:08
Mark Salsbery13-Nov-06 6:08 
GeneralRe: Need help! Unhdanled exception error in VC++ 2003 Pin
Waldermort13-Nov-06 6:11
Waldermort13-Nov-06 6:11 
GeneralRe: Need help! Unhdanled exception error in VC++ 2003 Pin
Mark Salsbery13-Nov-06 6:15
Mark Salsbery13-Nov-06 6:15 
AnswerRe: Need help! Unhdanled exception error in VC++ 2003 Pin
James R. Twine13-Nov-06 6:03
James R. Twine13-Nov-06 6:03 
GeneralRe: Need help! Unhdanled exception error in VC++ 2003 Pin
Mark Salsbery13-Nov-06 6:10
Mark Salsbery13-Nov-06 6:10 
Questionsome trouble when I use Createprocess Pin
abruzzi13-Nov-06 4:47
abruzzi13-Nov-06 4:47 
AnswerRe: some trouble when I use Createprocess Pin
Aqueel13-Nov-06 4:55
Aqueel13-Nov-06 4:55 
AnswerRe: some trouble when I use Createprocess Pin
Hamid_RT13-Nov-06 5:22
Hamid_RT13-Nov-06 5:22 
GeneralRe: some trouble when I use Createprocess Pin
ThatsAlok13-Nov-06 7:01
ThatsAlok13-Nov-06 7:01 
GeneralRe: some trouble when I use Createprocess Pin
Hamid_RT13-Nov-06 7:19
Hamid_RT13-Nov-06 7:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.