ANSWER: Why multi-core software is so hard...

Whizzard9992

Distinguished
Jan 18, 2006
1,076
0
19,280
I've seen this question, and addressed it alot in these forums. I've found an article written for software engineers that addresses this specific question in great detail.

For those adventurous souls looking to learn more about the problem developers face with multi-threading apps and multi-core hardware, this is a great article:

http://msdn.microsoft.com/msdnmag/issues/06/09/CLRInsideOut/default.aspx ( link )

Be forewarned, however, this is difficult topic for most intermediate programmers, so any non-engineers that can take a crack at this and understand it, kudos to you. Either way, perusing the article should still provide some useful info for those interested.
 

krazyIvan

Distinguished
Jan 6, 2006
290
0
18,780
Interesting reading so far, one thing that stands out is size does matter (cache, that is :lol: ). I’m glad I decided to go with an Toledo core rather then the Manchester for my 64 X2, I think Vista will make better use of the 1MB L2 then XP does.
 

kmjohnso

Distinguished
Mar 14, 2006
190
0
18,680
It's a descent article for a beginer. Cache performance will depend on the task of the code. I think the real issue is not how to multithread, but to find area of code that can be multithreaded. For example, I've always liked this talk about programming on xbox 360:

Xbox_Threading
 

russki

Distinguished
Feb 1, 2006
548
0
18,980
It's a descent article for a beginer. Cache performance will depend on the task of the code. I think the real issue is not how to multithread, but to find area of code that can be multithreaded. For example, I've always liked this talk about programming on xbox 360:

Xbox_Threading
I think the Xbox presentation underscores the threading problem, like you said. So far, with the few execution units available, it is relatively easy to find threads capable of parallel execution. As more and more cores are available, it will get to threading some of the tasks that right now are viewed as one thread - like game logic. And that's when the problems with identifying a parallel execution logic will start. It's not an easy chore, and definitely against the thinking that reigned programming since its inception.
 

BaronMatrix

Splendid
Dec 14, 2005
6,655
0
25,790
I've seen this question, and addressed it alot in these forums. I've found an article written for software engineers that addresses this specific question in great detail.

For those adventurous souls looking to learn more about the problem developers face with multi-threading apps and multi-core hardware, this is a great article:

http://msdn.microsoft.com/msdnmag/issues/06/09/CLRInsideOut/default.aspx ( link )

Be forewarned, however, this is difficult topic for most intermediate programmers, so any non-engineers that can take a crack at this and understand it, kudos to you. Either way, perusing the article should still provide some useful info for those interested.

MultiThreaded SW isn't hard. Asynchronous mutlithreaded is the hard thing. That's why MOST games DON'T have ASYNC multithreading. Sync issues are the concern since for xample with games the audio and video have to be sync'd such that the sound goes off when you pull the trigger or with physics, that the box explodes into shards based on the vector info from the projectile. This too has to be sync'd with the operation of the GPU if it's running on a separate thread.

Then there's the input mechanism. It gets complicated and shows why Carmack is JUST getting an MT engine. Managed code may actually give a lot to the task. Also DX 9 can only support so many objects, so DX10 and Vista will really be needed.

The XBOX360 CPU is not as general purpose as X64 so it can have DSP functionality without sacrificing multitasking perf.
 

krazyIvan

Distinguished
Jan 6, 2006
290
0
18,780
No Multi-thread/multi-core topic would be complete without bringing up PhysX.
Physics is one of the places I think the Gaming industry will make better use of dual-core cpu’s and multi-treads. And hopefully DX10 and Vista will be the catalyst that makes that happen. I think based on reading, Microsoft is aiming to make Dual-Core and the 64 bits an important part of Vista.