Slashdot Mirror


New Languages Vs. Old For Parallel Programming

joabj writes "Getting the most from multicore processors is becoming an increasingly difficult task for programmers. DARPA has commissioned a number of new programming languages, notably X10 and Chapel, written especially for developing programs that can be run across multiple processors, though others see them as too much of a departure to ever gain widespread usage among coders."

11 of 321 comments (clear)

  1. Parallel is here to stay but not for every app by Meshach · · Score: 3, Insightful

    Parallel is not going to go anywhere but is only really valid for certain types if applications. Larger items like operating systems or most system tasks need it. Whether it is worthwhile in lowly application land is a case by case decision; but will mostly depend on the skill of programmers involved and the budget for the particular application in question.

    --
    "Maybe this world is another planet's hell"
    Aldous Huxley
    1. Re:Parallel is here to stay but not for every app by grumbel · · Score: 4, Insightful

      Most computing intensive problems that a user will encounter at home are easily parallelizable, i.e. video encoding, gaming, photoshop filters, webbrowsing and so on. The amount of times where I maxed out a single CPU and the given problem would not have been to some large degree parallelizable are close to zero.

      The trouble is that they are only "easy" parallelizable in concept, implementing parallelization on an exciting serial codebase is where it gets messy.

    2. Re:Parallel is here to stay but not for every app by AuMatar · · Score: 4, Insightful

      And how many of those cores are above 2% utilization for 90% of the day? Parallelization on the desktop is a solution is search of a problem- we have in a single core dozens of times what the average user needs. My email, web browsing, word processor, etc aren't cpu limited. They're network limited, and after that they're user limited (a human can only read so many slashdot stories a minute). There's no point in anything other than servers having 4 or 8 cores. But if Intel doesn't fool people into thinking they need new computers their revenue will go down, so 16 core desktops next year it is.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    3. Re:Parallel is here to stay but not for every app by grumbel · · Score: 3, Insightful

      Web-browsing for instance, is not inherently paralizable.

      Of course it is. Each Tab can be rendered in parallel, each JPEG can be decoded in parallel, each character can be antialiased in parallel, each download can happen in parallel, all the pixel that make up the final image can be alpha blended in parallel.

      Yes, at some point you hit a wall where you will be left with a piece of code that you have to evaluate sequentially, you can't alpha blend half a pixel and your layouting engine might also require some sequential evalution. My point however is that none of those are CPU intensive enough to be a problem for normal use.

      These days I don't have to wait for my computer because it has to solve some tiny non-parallelizable task, but because my computer is doing some heavy data crunching that could be done in parallel without much of a problem.

      Or to put it another way: Half the for-loops out there just process each element in a list, the major reason why the don't do it in parallel is because the programming language makes it extremely hard to do so, not because there is some fundamental reason why it can't be done.

  2. We need async frameworks too! by PhrostyMcByte · · Score: 4, Insightful

    A lot of problems are I/O driven -- I would like to see more database client libraries allow a full async approach that lets us not block the threads we are trying to do concurrent work on.

  3. Awful example in the article by theNote · · Score: 3, Insightful

    The example in the article is atrocious.

    Why would you want the withdrawal and balance check to run concurrently?

  4. Re:Parallel programming is dead. No one uses it... by beelsebob · · Score: 3, Insightful

    Threading i don't count as parallel processing for the desktop. I don't even hear of any games or applications built for parallel.

    Uhhhhhhhhhhh? Yes, well done with that...

  5. A view based on history... by Anonymous Coward · · Score: 3, Insightful

    Rehash time...

    Parallelism typically falls into two buckets: Data parallel and functional parallel. The first challenge for the general programming public is identifying what is what. The second challenge is synchronizing parallelism in as bug free way as possible while retaining the performance advantage of the parallelism.

    Doing fine-grained parallelism - what the functional crowd is promising, is something that will take a *long* time to become mainstream (Other interesting examples are things like LLVM and K, but they tend to focus more on data parallel). Functional is too abstract for most people to deal with (yes, I understand it is easy for *you*).

    Short term (i.e. ~5 years), the real benefit will be in threaded/parallel frameworks (my app logic can be serial, tasks that my app needs happen in the background).

    Changing industry tool-chains to something entirely new takes many many years. What most likely will happen is transactional memory will make it into some level of hardware, enabling faster parallel constructs, a cool new language will pop up formalizing all of these features. Someone will tear that cool new language apart by removing the rigor and giving it C/C++ style syntax, then the industry will start using it

  6. Multi-threaded or Parallel? by ipoverscsi · · Score: 5, Insightful

    I have not read the article (par for the course here) but I think there is probably some confusion among the commenters regarding the difference between multi-threading programs and parallel algorithms. Database servers, asynchronous I/O, background tasks and web servers are all examples of multi-threaded applications, where each thread can run independently of every other thread with locks protecting access to shared objects. This is different from (and probably simpler than) parallel programs. Map-reduce is a great example of a parallel distributed algorithm, but it is only one parallel computing model: Multiple Instruction / Multiple Data (MIMD). Single Instruction / Multiple Data (SIMD) algorithms implemented on super-computers like Cray (more of a vector machine, but it's close enough to SIMD) and MasPar systems require different and far more complex algorithms. In addition, purpose-built supercomputers may have additional restrictions on their memory accesses, such as whether multiple CPUs can concurrently read or write from memory.

    Of course, the Cray and Maspar systems are purpose-built machines, and, much like special-build processors have fallen in performance to general purpose CPUs, Cray and Maspar systems have fallen into disuse and virtual obscurity; therefore, one might argue that SIMD-type systems and their associated algorithms should be discounted. But, there is a large class of problems -- particularly sorting algorithms -- well suited to SIMD algorithms, so perhaps we shouldn't be so quick to dismiss them.

    There is a book called An Introduction to Parallel Algorithms by Joseph JaJa (http://www.amazon.com/Introduction-Parallel-Algorithms-Joseph-JaJa/dp/0201548569) that shows some of the complexities of developing truly parallel algorithms.

    (Disclaimer: I own a copy of that book but otherwise have no financial interests in it.)

  7. Re:Chapel? by Raffaello · · Score: 3, Insightful

    No widely spoken human natural language was "invented," Modern English included. Where do people come up with these things? Modern English evolved out of Middle English, just as Spanish evolved out of Latin, etc. Modern English was not "invented" in any meaningful sense of "invernted."

    reference for WikiWeenies.

  8. Re:How to Solve the Parallel Programming Crisis by Louis+Savain · · Score: 4, Insightful

    Sorry but, IMO, the cell is a perfect example of how not to design a multicore processor. Heterogenous processors introduce nothing new to the table of solutions that was not already there. We had systems with CPUs and GPUs before the Cell (or Intel's Larrabee and AMD's Fusion) showed up. Everybody knows that they're a pain in the ass to program. Neither CUDA nor OpenCL nor Microsoft's much ballyhooed TBB (threaded building blocks) will change that fact.

    My point is that one does not design a parallel processor and then come up with a programming model to exploit it. It should be the other way around. The programming model should come first. One should design a model that makes parallel programming easy and the resulting apps rock-solid. Only then, after you have perfected your model, should you even consider designing a processor to support the model.

    IOW, everybody's doing it wrong, and by everybody, I mean the all big players in the multicore hardware/software industry: Intel, Microsoft, IBM, Sun-Oracle, AMD, ARM, Apple, FreeScale, etc. The major computer science centers who are getting a lot of research money form the industry are not helping either since they have to kowtow to the likes of Intel and AMD whose main interest is to safeguard their installed base and preserve continuity.

    It makes no difference. When the pain becomes unbearable (it's all about money), it will suddenly dawn on everybody that what is needed is to break away from the past.