Topic Title: Multi-threaded programming
Topic Summary:
Created On: 06/11/2013 07:02 AM
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 06/11/2013 02:39 PM
User is offline View Users Profile Print this message

Author Icon
Thanny
Alpha Geek

Posts: 1458
Joined: 07/13/2009

In the simplest terms, multiple threads requires synchronizing the results of the work done across those threads (and making sure threads don't try to access the same resources simultaneously).  That's a non-trivial task.

Beyond that, the biggest issue is serialized calculations.  Any long chain of calculations where each link requires the results of a previous link cannot be broken up into multiple threads of execution.

Designing a workload that can be broken up into an arbitrary number of threads is quite difficult.

 

 06/12/2013 06:38 PM
User is offline View Users Profile Print this message

Author Icon
Mime
Forum Moderator

Posts: 578
Joined: 08/28/2012

There are parallelizing compilers around, but they're far from being a magic bullet.  The decisions made on where and how to sync threads isn't something a machine can easily keep track of.

If too many points of sync are included, the extra time spent bookkeeping takes away from the benefit of using multiple threads in the first place.  If there's not enough, then your threads can go haywire, and you really don't want them to go haywire.  Debugging a badly behaved multithreaded application is notoriously difficult.



-------------------------

Do not meddle in the affairs of archers, for they are subtle and quick to anger.
Post Count: +8510
Troll Hunter

The opinions expressed above do not represent those of Advanced Micro Devices or any of their affiliates.

Statistics
86405 users are registered to the AMD Support and Game forum.
There are currently 2 users logged in.

FuseTalk Hosting Executive Plan v3.2 - © 1999-2014 FuseTalk Inc. All rights reserved.