Jump to content
  • Advertisement
Sign in to follow this  
DvDmanDT

HyperThreading and MMX?

This topic is 4745 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone.. What happends if I have a multithreaded application, running on an hyperthreaded cpu, where one tries to use MMX and one tries to do some regular fp math? Would it work fine, or would I get some extremely wierd crash? Can someone please explain hyperthreading? Does both processing threads share the same registers? Why does everyone want multicore CPUs when you can have Hyperthreaded? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
In a hyperthreaded core, each logical core has its own set of registers, but shares much of the logic units.

As compared to a normal, single threaded CPU, in a hyperthreaded configuration the processor can more effeciently make use of its logic units, since they wouldn't be sitting idle as much as if just one thread was executing on them.


In a multi-core CPU, each core contains its own set of registers and logic units.

With completely separated cores, concurrent threads don't share any internal CPU resources (although, they might share the memory bus, or even caches in some configurations).



As for crashes, no, you shouldn't see any...
In cases where the architecture of the CPU demands that certain parts cannot be shared between threads, it would be the job the operating system to protect user applications from this.

Share this post


Link to post
Share on other sites
Quote:
Original post by DvDmanDT
Hello everyone.. What happends if I have a multithreaded application, running on an hyperthreaded cpu, where one tries to use MMX and one tries to do some regular fp math? Would it work fine, or would I get some extremely wierd crash?


You would get 50 cycles worth of latency, because of MMX state handling, floating points should be done with SSE/SSE2 instructions. Real assembly programmers are using MMX register as a temporally register to increase amount of general purpose registers on a registry starved computer. Of course this would happen only when they would like to use the same part of a CPU.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!