Jump to content
  • Advertisement


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


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

This topic is 5719 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
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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!