datasheets.com EBN.com EDN.com EETimes.com Embedded.com PlanetAnalog.com TechOnline.com  
Events
UBM Tech
UBM Tech

News & Analysis

Comment


Neo1

5/23/2011 4:57 AM EDT

I agree with Eric that we all, including I feel that parallel programming is ...

More...



Sheetal.Pandey

4/29/2011 8:13 AM EDT

absolutely..engineers have to work both in hardware and sofwtare to have delvier ...

More...

Multicore programmers must 'think different'

Rick Merritt

3/21/2011 12:01 PM EDT

SAN JOSE, Calif. – Engineers need to think differently to be successful in the transition to multicore programming, according to the keynoter for an online conference this week.

“First, don’t accept the premise that parallel programming is hard; and second, don’t accept the notion that it’s okay to know only one layer” of a design, said Yale Patt, a professor of engineering at the University of Texas at Austin.

“People can think parallel if they’re not told ahead of time that it’s hard,” said Patt in comments for a keynote to be delivered Thursday (March 24) as part of a virtual conference on multicore hosted by EE Times.

In the keynote, Patt will puncture holes in a number of multicore myths. For example, layers of abstraction are not necessarily good, and engineers should work across layers of hardware and software design if they are to be successful in multicore, he said.

The free online event also includes separate panels on high-end and integrated multicore processors with representatives from Intel, MIPS, Tensilica, Tilera and Xilinx. A software panel includes panelists from Nokia Siemens Networks, Samsung and Wind River.

The event will also include online chats on hardware and software topics as well as vendor training sessions.





Mapou

3/21/2011 6:27 PM EDT

I think professor Pratt is doing the programming and multicore community a disservice. Parallel programming is indeed hard, his claims to the contrary, notwithstanding. Parallel programming is hard primarily because the current multicore paradigm evolved from last century's Turing-inspired computer models which were not designed with parallelism in mind.

The biggest hurdle is the non-deterministic nature of concurrent threads, the industry's chosen approach to parallelism. It's an absolute disaster because the human brain, an ultra-parallel computer, cannot makes sense of its sensory space unless it is temporally deterministic. Deterministic timing is the key to future of parallel programming. Our current crop of multicore processors falls way short of that ideal.

Remember all the millions that was injected into university parallel programming research labs a few years ago by the likes of Intel, Microsoft, Nvidia, etc.? Guess what? It was all wasted money. Nothing worthwhile came out of it. Why? Because the computer science community worships the Turing machine as God's gift to humanity. That's just too bad because the Turing computing model is the cause of the problem, not the solution.

If you're interested, Google "How to Solve the Parallel programming crisis" and "Why Parallel Programming is So Hard" for a different take on this problem.

Sign in to Reply



jonathanmay

3/24/2011 5:55 AM EDT

"... human brain, an ultra-parallel computer, cannot makes sense of its sensory space unless it is temporally deterministic"

This is just a grandly-worded but bland assertion.

For a example of formally modelled non-determinism, see CSP.

If you are referring to the non-deterministic timing introduced by layering hierarchies of memories to try to emulate an infinite "tape", then you are right - this non-determinism is a bane.

I think non-deterministic ordering of events is very different from non-deterministic running times for sub-computations or instructions - the latter being the problem.

Sign in to Reply



david.may

3/24/2011 12:10 PM EDT

yes Dave's a smart guy after all he did invent the transputer :D
they could do a lot worse than rush an invite have him on the panel as guest speaker and to raise his profile in the wider tech world.

its hard to believe but there are actually people out there that have never heard of him or his transputer innovation http://www.cs.bris.ac.uk/~dave/transputer.html
long before today's multi core/multi desktop CPU configurations become common place.

keep in mind too his law still seems true today :P
"May's Law

Software efficiency halves every 18 months, compensating Moore's Law."

http://en.wikipedia.org/wiki/David_May_(computer_scientist)

Sign in to Reply



david.may

3/24/2011 12:20 PM EDT

oops dont know what happened there, this should have been lower down under the XMOS/OCCAM aka transputer reference

no relation to him although cool name, im sure you agree Jonathan :P

Sign in to Reply



Mapou

3/24/2011 3:41 PM EDT

Me: "... human brain, an ultra-parallel computer, cannot makes sense of its sensory space unless it is temporally deterministic"

Jonathan: "This is just a grandly-worded but bland assertion."

How so? Consider, for example, that the brain's 3-D visual system, would not work if the laws of optics were not deterministic. The brain expects visual signals to obey these laws as we move around in our environment. Without this determinism in nature, we would never learn anything.

My point is that events in a software system that are supposed to be deterministic should remain so always. Otherwise, you run into all sorts of reliability and software comprehension problems. The concurrent-threads model used by the multicore industry does not guarantee this sort of determinism and therein lies the major part of the problem. One man's opinion, of course.

Sign in to Reply



jonathanmay

3/25/2011 5:28 AM EDT

I cited two examples of nondeterminism - one by calculus model (CSP) and one by architecture implementation (memory hierarchies). One I believe causes a problem (the latter), the other I think does not.

I completely agree that "events that are supposed to be deterministic should remain so". But I cannot think of any examples where this is not true. Even non-deterministic timing from memory hierarchies is generally thoroughly documented and you can design around the worst-case to give you either asymptotic estimates or absolute bounds on program performance. And in some cases non-determinism is by design and therefore does not break your rule above.

If I were being really picky, your original statement demanded "temporal" determinism, whereas your follow-up claim relates to essentially spatial determinism.

With your final point - what is this "concurrent-threads model used by the multicore industry"? Which model are you referring to? Why does it not guarantee determinism? Why is determinism needed?

Sign in to Reply



jonathanmay

3/25/2011 5:29 AM EDT

Haha another David May?

David is my father by the way.

Sign in to Reply



david.may

3/25/2011 7:43 AM EDT

cool, :D he does seem hard to find online generally...

you should get him to come here under "transputer dave"

and have him write some articles for EEtimes, im sure they would take them :P

and OC many people would love to read his thoughts and many subjects.

Sign in to Reply



DF

3/25/2011 6:56 PM EDT

The big nondeterminism-related issue with parallel programming is dealing with race conditions and timing. Depending on how quickly the different threads execute, you can get potentially completely different results. Compounding the problem is that such bugs are very difficult to reproduce, and may only occur under very unusual conditions.

Structures like caches do not affect the actual program result, assuming of course that there's no bugs in the caches. The only nondeterminism that occurs is with how long the program takes to execute.

In short, parallel programming can potentially make correctness nondeterministic.

Sign in to Reply



Enric Musoll

3/22/2011 12:14 PM EDT

Patt, not Pratt ...

Sign in to Reply



LarryM99

3/22/2011 12:25 PM EDT

It is certainly possible for some people to intuitively think in parallel paths. It is also almost certainly possible to train other people to think in that manner. But if you want to open up programming these beasts to a wider audience you really need to come up with a programming abstraction that they understand rather than forcing them into the guts of the hardware. You can argue that Web programmers aren't really programmers because they don't program to the metal like "real" programmers, but they get useful things done with computers. Purity arguments aside, that is valuable.

Larry M.

Sign in to Reply



jonathanmay

3/24/2011 6:09 AM EDT

The point here seems to be that we need to come up with a model of concurrency which is easy enough for anyone to code with. E.g. a web "programmer".

Taking your example, web programmers are heavily insulated from the metal by so many layers that they are very often totally unaware what happens underneath. They are, however, rarely given enough rope to hang themselves.

The challenge to make this work for concurrent languages is a harder intellectual challenge for the designer of the tools - and requires a different way of thinking from the programmer.

Models do exist - the work done by Leslie Valiant on BSP and related models of computation are methods by which it is possible to achieve asymptotic efficiency in the mapping of for example the dreaded shared-memory model to massively-parallel hardware. It can work with other models of computation - it is a universal model of parallel computation which leaves the programmer as unable to make a noose for themselves as a web programmer is today.

It is a shame that so few of these ideas have been picked up and explored in the past 20 years.

Architectures need to better support vital primitives for concurrency efficiently and deterministically (e.g. thread synchronisation). See e.g. XMOS for examples of this.

Low-level languages need to express concurrency in an elegant and "exposed" form - see for example CSP as a computational model and OCCAM/XC or even languages such as Go for examples of how to achieve this. Apologies to the many languages I've missed out.

Higher-level languages "for the masses" will need to build on the techniques and work of "bridging"/"universal" models to create programming metaphors much in way the Turing model led to the programming metaphors for sequential computation.

Sign in to Reply



david.may

3/24/2011 12:51 PM EDT

ooh i dont know , people just need to look off the beaten track for instance did you ever look at and try REBOL (the internet and GUI programming language) by Carl Sassenrath, who also did the Amiga message passing OS back in the day

http://www.rebol.com/docs/reference.html

that is making slow progress by other standards but is really good for quickly prototyping many a GUI and remote networked control interface , and wrapping your generic C,assembly routines library's etc in a nice simple cross plaform script.

he's also against "Software complexity pollution: just say no to "the standard of practice".
"
http://www.rebol.com/article/0497.html

Sign in to Reply



JDatQTP

3/23/2011 12:15 PM EDT

“…don’t accept the premise that parallel programming is hard”

This depends on one’s perspective and your measure of accomplishment. It is easy to parallelize a simple for loop and proclaim yourself a parallel programmer, it is difficult to correctly parallelize a complex application to yield optimal and correct results.

“…engineers should work across layers of hardware and software designs…”.

Yes, but this increases the difficulty in assuring correctness. This requires attention to what can and cannot be done concurrently, it introduces temporal issues that are not present in a serial application, it causes adverse interaction issues which require synchronization primitives not found in serial programming.

The “programmer” has to look at design changes for vectorization opportunities, review the data flow to see if the parallelization efforts are better spent going from inner levels to outer levels or from outer levels to inner levels. Additionally, the programmer has to look for parallel pipelining opportunities, and do this without introducing adverse side effects. We have yet to address larger parallelization efforts using separated systems (MPI, ccNUMA, …). While the individual components are not “hard” making them work correctly and efficiently together is hard with respect to getting all the details correct.

Looking across layers of hardware and software designs requires a major reorganization of the data and code. In some cases this is tantamount to taking a band saw or a bread slicer to a million lines of code, separating the code and data to optimize the concurrency opportunities, and then piecing it back together. Is parallel programming hard? There is no simple answer to this: on one end it is easy, on the other end it is well beyond the capabilities of the ordinary programmer.

Jim Dempsey
www.quickthreadprogramming.com

Sign in to Reply



Ido Sarig

3/23/2011 4:09 PM EDT

I think Jim is spot on when he says "...this increases the difficulty in assuring correctness. "

In fact, assuring correctness is one of the biggest challenges facing parallel development. It requires not only a new approach to development, but a new approach to testings and validation.

Ido
http://www.windriver.com/products/test_management/

Sign in to Reply



Charles.Desassure

3/24/2011 3:20 PM EDT

Greetings,
I think professor Pratt had a very bad conference day. Parallel programming is hard. If it was that simple, I think we would have told our students and children that for all subject. Some part of Parallel Programming is easy, just like some part of a math, computer science and other subjects are too. But overall, it depends on the tasks and the different levels within the Parallel programming that you are using. So, Professor Pratt is far off the mark here.

Sign in to Reply



Eric Verhulst_Altreonic

3/24/2011 5:10 PM EDT

Parallel programming is not hard at all. It is actually a lot more natural provided that:
1. The right parallel programming paradigm is used. CSP derived ones are a good start because it breaks up the hard to cope with huge shared state.
2. You have to undo years of brainswashing thinkin in terms of sequential programming.
3. The hardware would be designed correctly, i.e. support concurrency.
Software is essentially modelling real or virtual worlds that are most of the time concurrent by nature. Programming in sequential languages is trwong away the concurrent information. Hence parallelising such programs is mediocre exercise in reverse engineering.
We have developed since 20 years distrbuted RTOS as "pragmatic supersets of CSP". Some systems ha 12000 processors (each only 128 KBytes). Without our software it would have been sheer impossible to program them. The latest OpenComRTOS was formally developed and does that in 5KB/node. This is a lot more efficient than any middleware solution on top of a sequential runtime layer. Divide et impera (divide and conquer). We call it "Interacting entities". Once you grasp it, life becomes a lot easier.

Sign in to Reply



Dave.Dykstra

3/25/2011 12:02 AM EDT

Parallel programming is not easy for most of us that learned programming back in the dark ages, but could certainly be made a lot simpler for new programmers since they could be taught a newer paradigm.

Sign in to Reply



jonathanmay

3/25/2011 5:38 AM EDT

OK - I challenge anyone who thinks "parallel programming is hard" to pick up a book by Per Brinch Hansen - "Parallel Programming Paradigms" - read that and then tell me it's hard.

Better still, you don't even have to wait - you can go and read his work here:

http://brinch-hansen.net/papers/

Sign in to Reply



Eric Verhulst_Altreonic

3/25/2011 6:36 AM EDT

I would even go one step further. In 1988 (that's already years after Hoare wrote the book on CSP), Chandy and Misra (Uni TX, Austin) write "Parallel Program Design", basically a book on using UNITY (a kind of formal notation) for specifiying what a program should do, not on how it should do it. What the book made clear to me, is that there are no parallel algorithms. You have algorithms and they have sequential as well as parallel (or mixed) implementations. Often the parallel version is a lot easier and simpler. Even a quicksort is very easy to rewrite in a parallel version.

The issue is that the processor architects and hence the programming language developers suffer from the "von Neuman" syndrome. Hence, they can only think in terms of shared memory, shared state spaces and sequential logic. And of course, this is hard because you must control the state space in time to keep it consistent.
If you think in terms of concurrency, the problem largely goes away because the state spaces become local. How does one achieve determinism? By synchronisation, ths makes the logic time-independent. Most RTOS do this quite well. Thread based programming doesn't and that's why it is hard. Unfortunately, this bad reputation has spread to the whole notion of parallel programming. For the wrong reasons. Think parallel, optimise sequentially (because you exploit local propertie. Makes the cod emaybe faster, but you loose the scalability that a good concurrent programming model offers.

Sign in to Reply



peter.clarke

3/25/2011 9:43 AM EDT

Parallel programming may or may not be hard (pun intended) but it certainly seems to be at odds with the linear "programming model" used in conventional speech and writing.

What is definitely hard is getting an industry of millions of programmers to change from the status quo (C/C++) without clear economic benefits.

Where 1 or 2 digital orders of magnitude of benefit can be shown (x10 or x100) change over is almost immediate. Where the benefit is present but marginal -- a few tens of percent or x2 -- it is not so easy and often does not happen.

Vested interests and hidden costs maintain the old ways of doing things [return to top of story :-) ].

Sign in to Reply



KB3001

4/19/2011 6:09 AM EDT

I agree that the Economics have to be right, but practical experiences have shown that Computer Science students find it harder to program in parallel than in serial, FACT. I hence do not agree with Prof. Patt's assertion. Also, the human brain, while parallel in its functioning, is much more comfortable with deterministic sequential behaviour. As for the parallel programming question, it has to be a decision based on return on investment, yes. High level APIs or skeletons have to be developed for the average programmer for the sake of productivity, while low level parellel programming should be the craft of a few, when it is economically viable to do so.

Sign in to Reply



Eric Verhulst_Altreonic

4/19/2011 6:55 AM EDT

I tend to disagree. If you know that the brain essentially works as a pattern matching neural net, then you know that if you train it in certain way, the pattern 'sticks' and the nit only seems like sequential thinking is more natural. For every carpenter, every problem can be solved with a hammer and a nail.
I speak of personal experience. I only learned to program in parallel 10 years after I had learned to program (sequentially). Then I wanted to learn occam (the forgotten language based on CSP). I didn't get anywhere even after 1 month. Then I went to a training course and during the first exercise I made the mental switch, the typical Ha-Ha Erlebniss. From then one, I never understood my people wanted to make life so difficult by forcing everything to be programmed sequentially. The world is parallel and software programs are essentially models of such a world, so why not program in a natural way?

Sign in to Reply



KB3001

4/20/2011 4:56 AM EDT

@Eric Verhulst_Altreonic, I heard such stories before (the Damascene conversion moment etc.) but they are the exception rather than the rule in my experience. Yes, the brain is parallel in its functionning, that's why it's good at tasks such as pattern matching but try to ask 100 kids to do 2 or 3 tasks at the same time and you'll see :-) Some can be trained to do it, but most would struggle.

On a side comment, do not they say women are better at multi-tasking than men? Should not women then be better parallel programmers? May be we should invest in female parallel programmers :-)

Sign in to Reply



Eric Verhulst_Altreonic

4/20/2011 5:11 AM EDT

I certainly would love to see more female engineers. Never understood why they shy away from this no-muscles-involved domain.
But to come back to the topic. Concurrent programming (the CSP type of paradigms) is exactly a way to reduce the number of things you have to keep in your head. It is a divide and conquer strategy. While a sequential program has a huge state-space to keep track off in the head, concurrency provides modularity and smaller state spaces. Each process can be a small, dedicated function. This reduces the global space problem to only look at how the modules are interacting. And as the protocol is then fixed, one can change any module without having to look at the state space of the other modules. Our programming model even achieves this across network and processor boundaries. How do you handle this with a single sequential thread on each processor? It is vastly more complex and close to impossible.

Sign in to Reply



Robinho

3/25/2011 12:25 PM EDT

As someone mentioned above, parallelising simple pieces of code is easy. Maintaining and managing parallelism is very hard. The layers of abstraction are indeed a hurdle to parallel programming. However, the layers of abstraction are there for a reason. They allow you to break problems in simple pieces that can be understood and implemented well. The complexity of understanding sequential code grows exponentially as the levels of abstraction are removed. It would be hard to manage and maintain a few million lines of code without those levels of abstraction.

Parallel programming is hard. The tool support for debugging issues is archaic. If there are constructs in programming languages that allow for simple synchronization, that would help break problems into simpler pieces and easier to program.

There is a limit to human comprehension (yes all applications have bugs). A sequential model allows simple checkpoints to break pieces into simpler pieces and test or debug them effectively. Parallel programming adds a lot of complexity and understanding issues across various levels of abstraction is easier said than done.

Sign in to Reply



Al_

3/25/2011 3:23 PM EDT

Parallel programming is not hard at all... it's only hard when you've been raised on languages like Fortran, Basic, C, and these days, java, c++ and all the rest...

The key is how you are taught to think about problems. In the old days when people were taught line numbers and GOTO statements, that was the biggest disservice one could have done to a budding computer software person. I of course am and will always be a Lisp/Scheme believer when it comes to teaching basic computer science principles, ideas, and programming. The right language keeps you from developing bad thought patterns, bad habits, and bad ways of thinking about solving the problem. A bad language corners you into the classic problem that everything looks like a nail when all you have is a hammer...

To learn how to program parallel structures, you need the right language (and cthreads is NOT it...) All these things are hacks on top of your classic SISD Von Neumann architecture type thinking. Harvard Architectures, MIMD machines, etc. are all programmed with the old ideas cast in stone, and with simple additions to exploit some part of the new underlying architecture.

Sign in to Reply



Al_

3/25/2011 3:23 PM EDT

What you need is to learn and teach parallelism at the highest level and with an appropriate language. Then the parallel programming nature of problems become obvious and not hard at all.

I don't know what happened to him after all these years but Jon Webb (from CMU's Vision and Autonomous Systems Center) did some GREAT work on this. The Adapt language was the perfect example of what I am talking about. A general language that let's you think about and break down the inherently parallel processes in image processing into a very simple language and set of constructs that can then be compiled on to any machine architecture efficiently, no matter how linear or how parallel that architecture is and take full advantage of any parallelism afforded. You could run on a basic Intel x86 machine, a toroidal iWarp of any number of nodes, or even a Cray Y-MP and you saw very efficient scaling in terms of processor resources at your disposal.

Parallel Programming is easy when you know the right language to use. Developing those languages is the hard part and a part of computer science (in my opinion of course) that has been withering away for at least 15 years... I believe due to the mostly brute-force, inelegant methods thrown at the ever increasing resources available. Elegance is gone... mapping elegance onto crude architectures with bad compilers makes parallel programming appear hard...

Sign in to Reply



wave.forest

3/25/2011 6:56 PM EDT

Parallel programming is easy if the nature of a problem nature is paralleled, such as many image processing. Parallel programming is hard if the nature of a problem is sequential, such as division.
I'll be very happy to see Professor Patt show an efficient way to do a 4096-bit number divided by a 2048-bit number in parallel. :)

Sign in to Reply



DynamicLogic.US

3/31/2011 9:39 AM EDT

Google engineers showcased android 3 honeycomb recently which is said to do efficient deserialization from c script like code. Those concepts address several of the issues mentioned above. Interested to hear how well it works for various problems.

Sign in to Reply



wave.forest

4/1/2011 9:20 AM EDT

This kind of tools have been around since 1970s ...

Sign in to Reply



gronk

3/31/2011 7:34 PM EDT

Non-deterministic program execution is hard to debug. Ideally, one would do a Monte Carlo simulation to achieve coverage of all the possible outcomes.

Fortunately, Monte Carlo simulations can be easily parallelized on multi-core computers ;)

Sign in to Reply



Sheetal.Pandey

4/29/2011 8:13 AM EDT

absolutely..engineers have to work both in hardware and sofwtare to have delvier the right stuff. it is always helpful for the embedded program if we have sofwatre engineers who undeerstand how hardware works and software engineers who know the limitations of hardware.

Sign in to Reply



Neo1

5/23/2011 4:57 AM EDT

I agree with Eric that we all, including I feel that parallel programming is hard. But if we take the problem space usually many of those in nature are not sequential, it is made sequential in our reference books/text books so that they can be imlpmented using the progamming language at hand and compiled to machine code. Infact it is the dearth of exposure during our formative years to the parallel nature of problems that makes us narrow minded later on in our careers. How often are we in our schools and colleges asked to write in a progam that offers parallel programming contructs, all we are taught and exposed to is c/c++ java, etc which have a bug legacy of tought and support to work on.
It needs to be introduced early like in CS101 and it students would natutally take to it like fish to water.

Sign in to Reply



Please sign in to post comment

Navigate to related information

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)