February 5th, 2009, 2:20 pm
QuoteOriginally posted by: Cuchulainnsome sobering thoughts on parallel programming from Donald Knuth QuoteDonald: I dont want to duck your question entirely. I might as well flame a bit about my personal unhappiness with the current trend toward multicore architecture. To me, it looks more or less like the hardware designers have run out of ideas, and that theyre trying to pass the blame for the future demise of Moores Law to the software writers by giving us machines that work faster only on a few key benchmarks! I wont be surprised at all if the whole multithreading idea turns out to be a flop, worse than the "Itanium" approach that was supposed to be so terrificGiven that both the low-level architectures (e.g., multicore CPUs) and the high-level architectures (e.g. cloud computing) are moving in the direction of increasing parallelism, the onus seems on software folk to create a paradigm for parallel computing.Part of me wonders whether procedural languages are simply the wrong tool for parallel problems because procedural is inherently serial. This seems like a Sapir-Whorf problem and perhaps some prevailing languages just don't give us the right words to speak fluently about parallel computing.Perhaps it's time to take a step back and enumerate what we need to talk about when constructing code for parallel environments. These might include:1. Partitioning whole problems into parallel sub-elements (is this an object decomposition problem?)2. Understanding or immunizing against out-of-order execution (avoiding the trap of assumed sequences)3. Dealing with asynchronous or synchronous coupling between parallel sub-elements.4. Aggregating results from parallel sub-elements into a coherent whole.5. Picking the right granularity -- just because something can be parallel, doesn't mean it should be parallel.6. Understanding the resource trade-offs for creating/maintaining/aggregating 2N parallel sub-elements vs. N or understanding N+1 sub-elements vs. N or understanding M sub-elements vs. N processing units.What's interesting to me are the cases in which the algorithm seems inherently serial, but the problem is definitely parallel. For example, recursive algorithms for the factorial function (and many algorithms like it) look serial, but the actual function can be very parallel (with as many as N-1 threads if one seeks minimum latency). What language should we use to talk about a problem so that it's easier (or at least as easy) to speak of the parallel version as to speak of the serial version?
Last edited by
Traden4Alpha on February 4th, 2009, 11:00 pm, edited 1 time in total.