April 21st, 2010, 05:43 AM
In this post dvyukov argues about the lack of programming tools when dealing with "unstructured concurrency" programs; more specifically, I'm thinking at those situations in which you have a system of heterogeneous software components concurrently interacting in a non trivial and non predetermined way.
In these scenarios threads have simultaneously a program structuring effect ( encouraging componentization, where to each concurrent processing unit corresponds specific services / responsibilities ) and a performace impact ( because being the system heterogeneous , you can add new components without affecting the overall user experience via parallel execution ). Performance is not critical, in the sense that performance requirements are not strictly specified, but it's a valuable asset, in the sense that more responsivity and less time will be positively perceived by the user. Therefore, program correctness and scalability (with respect to parallel hardware) become more important then absolute performance and tight synchronization control.
What are your general view on the subject, espacially regarding tools/programming languages/frameworks ?
April 21st, 2010, 12:53 PM
Re: unstructured concurrency
I think you're describing what I call functional parallelism (or decomposition). Separate (heterogeneous), independent functions are each assigned to a thread in order to simplify the code and logic of the application. Rather than cod esome polling loop to determine which thread needs some CPU time, the threads run when they can and coordinate if there is any data sharing needed (e.g., computation thread needs to GUI thread to update display).
Explicit threading methods, OpenMP and TBB all have ways to create threads/tasks executing a function. If everything is spawned from the same process, the Intel threading tools and many others can analyze these applicaitons. When you begin launching separate processes instead of threads, tools probably haven't been developed to work in that environment. (The Intel Cluster Tolls will allow you to analyze several different MPI executables that are launched at the same time.)
It may all be a matter of taste or what kind of programming you're used to. If you start programming with functional decompositions, then data decomposition might seem bizarre and vice versa.
Intel Innovative Software Education
"There are no evil threads; just threads programmed for evil."
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!