Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

xenomorph69

Back to basics SMP Style !!!!!!!

This topic is 5638 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

I have been reading the threads (no Pun intended ) on Multi - threaded programs, However I visited www.openmp.org and have a few questions. I am running Redhat 9 and did some more reading on p_threads . where can I find information in making a "Hello World" Application where it is SMP? Example cpu0 displays "Hello", cpu1 displays "World". Of course I am using gcc. is there any site that you fine people know of that has the tutorial and a full explanation of using p_threads? I am wanting to try this on C and C++, not fortran, also is there a difference in coding for Hyperthreading as well? Since we are dealing with a Physical CPU and a Virtual opposed to two physical CPUS? Thanks in advance Shut up brain!!! Or I will stab you with a Q-Tip!!!

Share this post


Link to post
Share on other sites
Advertisement
Hyper-threading is misnomer, hypo-threading is more accurate. It''s just two decoding units - two funnels of code into one bus, one ALU & one FPU. It will behave very much like the time-slicing predacessors.

True SMP machines can actually process two things simutaneously. There are issues with read-modify-write cycles and local CPU caching. The Intel SMP architecture is very friendly to the software programmer, as the truely ugly issues (stale cache) are handled by the hardware (the CPUs and bus-controller(s)).

You still need to ensure that data really is written to main memory, and not optimized into a local register (or left in the write cache) for the cases that are important.


Try google for pthread tutorial

- Magmai Kai Holmlor

"No his mind is not for rent, to any god nor government" - Rush, Tom Sawyer

[Look for information | GDNet Start Here | GDNet Search Tool | GDNet FAQ | MSDN RTF[L] | SGI STL Docs | STFW | Asking Smart Questions ]

[Free C++ Libraries | Boost | ACE | Loki | MTL | Blitz++ | wxWindows| Spirit(xBNF)]
[Free C Libraries | zlib ]

Share this post


Link to post
Share on other sites

  • 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!