Jump to content
  • Advertisement
Sign in to follow this  
GuyWithBeard

Problem with multi-core programming - GPG8

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

Hi,

I am looking over the gem "Efficient and Scalable Multi-core programming" from Game Programming Gems 8, and I am having some problems with deadlocking. Basically the code runs perfectly out of the box. The main function does some benchmarking with three different types of tasks, measuring the execution time of multi vs single thread versions.

The code runs perfectly out of the box every time. However, if I take the testing code and run it 100 times in a loop, at some point the code will go into deadlock, with all the working threads waiting for work, and the main thread waiting for work to complete.

I am running this on a Core i7 (ie. with 8 HW threads). If I force the thread count to 1, the code works, but even with two threads the problem occurs. Have anyone else had some problems with this gem, or am I doing something wrong?

Share this post


Link to post
Share on other sites
Advertisement
I'm not familiar with the locking mechanisms used in that gem off the top of my head; any chance you could describe the locking strategy and maybe post some simple code that exhibits your problem?

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!