Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming IT Technology

More Interest In Parallel Programming Outside the US? 342

simoniker writes "In a new weblog post on Dobbs Code Talk, Intel's James Reinders discusses the growth of concurrency in programming, suggesting that '...programming for multi-core is catching the imagination of programmers more in Japan, China, Russia, and India than in Europe and the United States.' He also comments: 'We see a significantly HIGHER interest in jumping on a parallelism from programmers with under 15 years experience, verses programmers with more than 15 years.' Any anecdotal evidence for or against from this community?"
This discussion has been archived. No new comments can be posted.

More Interest In Parallel Programming Outside the US?

Comments Filter:
  • Duh? (Score:4, Informative)

    by gustolove ( 1029402 ) on Tuesday March 25, 2008 @02:45AM (#22854458) Journal
    Old programmers don't want to learn new things -- trust the tried and true.

    Young bucks want to be on the cutting edge to get the jobs that the old people already have.

    ----

    Oh, and the people see the benefit in the other countries more than those in the U.S.? Probably not, we're just lazy American's though.

    • Re: (Score:3, Interesting)

      by AuMatar ( 183847 )
      Young bucks jump on the latest thing without thinking (or the experience to back their thoughts) of whether or not its the best way to go.

      The experienced programmers know that most parallelisable problems are already being solved by breaking it across machines, and the rest won't be helped by 15 bazillion cores. An extra core or so on a desktop is nice, beyond that they really won't be anywhere near the speedup its hyped.
      • Re:Duh? (Score:4, Informative)

        by foobsr ( 693224 ) on Tuesday March 25, 2008 @04:09AM (#22854734) Homepage Journal
        the latest thing

        1960: E. V. Yevreinov at the Institute of Mathematics in Novosibirsk (IMN) begins work on tightly-coupled, coarse-grain parallel architectures with programmable interconnects. ( c.f. [vt.edu] )

        An extra core or so on a desktop is nice, beyond that they really won't be anywhere near the speedup its hyped.

        And of course any virtual reality scenario will not profit from extra power.

        CC.
        • Re:Duh? (Score:4, Informative)

          by Inoshiro ( 71693 ) on Tuesday March 25, 2008 @10:03AM (#22857456) Homepage
          "And of course any virtual reality scenario will not profit from extra power."

          It's more a matter of what kind of speedup you see, and what algorithm you start with.

          If your algorithm is serial, and there is no parallelism to speed it up, you're not going to see any speed increase. This applies to a lot of things, such as access to the player-character status variables (all cores use the same memory address, so they need a mutex or other synchronization anyway). Any AI-NPC interactions would likely need to be coordinated. You could divide the large stuff across some collection of cores (physics core, AI core, book-keeping core, input core), but not all of those will break down further (so an 80 core machine is a limited speedup over a 4 core machine -- which is, itself, a limited speedup over a basic 2-core machine for most people).

          The easy things to breakup are embarrassingly parallel problems (like certain graphics activities), and they are being broken up across GPUs already. Algorithms, even if they are entirely easy to parallelize, are still linear. To be 10 times faster, you need 10 processors (this is why GPUs have a lot of simple graphics pipelines and shader processors -- they're throwing more hardware at the problem). If a problem is simply too big (you need to be 1000 times faster, or exponential and beyond algorithms), more hardware isn't going to help.

          People seem to think that parallel programming will make the impossible into something possible. That's not true. Proving NP = P and coming up with efficient algorithms for certain things will. More hardware won't -- it'll just make things that were O(n) or O(log n) [for a sufficiently large n, like the number of pixels in a 1920x1200 monitor] possible. It won't affect O(n^2) and above.
          • Re:Duh? (Score:5, Insightful)

            by Lally Singh ( 3427 ) on Tuesday March 25, 2008 @12:52PM (#22860250) Journal
            Ugh.

            Yes you can parallelize a VR system quite well. You can simulate a couple dozen NPCs per core, then synchronize on the collisions between the few that actually collide. You still get a nice speedup. It ain't 100% linear, but it can be pretty good. The frame-by-frame accuracy requirements are often low enough that you can fuzz a little on consistency for performance (that's usually done already. ever heard "If it looks right, it's right?").

            Parallel programming is how we get more speed out of modern architectures. We're being told that we're not going to see Moore's law expand in GHz like it used to, but in multiple cores. Nobody things it's a panacea, except maybe the 13yr old xbox kiddies, but they never counted.

            As for making impossible into possible, sure it will. There are lots of things you couldn't do with your machine 10-15 yrs ago, you can do now. Many systems have performance inflection points. As we get faster (either with a faster clock or a larger number of cores), we're going to cross more of them. I remember when you couldn't decode an mp3 in real time on a desktop machine. With the I/O and space costs of uncompressed music, that meant that you didn't really listen to music from your computer. Impossible -> Possible.

      • Re: (Score:2, Interesting)

        by tedgyz ( 515156 ) *

        Young bucks jump on the latest thing without thinking (or the experience to back their thoughts) of whether or not its the best way to go.

        The experienced programmers know that most parallelisable problems are already being solved by breaking it across machines, and the rest won't be helped by 15 bazillion cores. An extra core or so on a desktop is nice, beyond that they really won't be anywhere near the speedup its hyped.

        Mod this guy. Short and to the point.

        I worked extensively with parallel programming since the early 90's. There is no silver bullet. Most problems do not parallelize to large scales. There are always special problems that DO parallelize well, like image and video processing. So, if you are a watching 20 video streams, your Intel Infinicore (TM) chip will be worth the $$$.

        • Re:Duh? (Score:5, Interesting)

          by bit01 ( 644603 ) on Tuesday March 25, 2008 @07:16AM (#22855538)

          I work in parallel programming too.

          Most problems do not parallelize to large scales.

          I'm getting tired of this nonsense being propagated. Almost all real world problems parallelize just fine, and to a scale sufficient to solve the problem with linear speedup. It's only when people look at a narrow class of toy problems and artificial restrictions that parallelism "doesn't apply". e.g. Look at google; it searches the entire web in milliseconds using a large array of boxes. Even machine instructions are being processed in parallel these days (out of order execution etc.).

          Name a single real world problem that doesn't parallelize. I've asked this question on slashdot on several occasions and I've never received a positive reply. Real world problems like search, FEA, neural nets, compilation, database queries and weather simulation all parallelize well. Problems like orbital mechanics don't parallelize as easily but then they don't need parallelism to achieve bounded answers in faster than real time.

          Note: I'm not talking about some problems being intrinsically hard (NP complete etc.), many programmers seem to conflate "problem is hard" with "problem cannot be parallelized". Some mediocre programmers also seem to regard parallel programming as voodoo and are oblivious to the fact that they are typically programming a box with dozens of processors in it (keyboard, disk, graphics, printer, monitor etc.). Some mediocre programmers also claim that because a serial programming language cannot be automatically parallelized that means parallelism is hard. Until we can program in a natural language that just means they're not using a parallel programming language appropriate for their target.

          ---

          Advertising pays for nothing. Who do you think pays marketer's salaries? You do via higher cost products.

          • Though you say "they're not using a parallel programming language appropriate for their target."

            I think too much emphasis is put, by some, on using a high level language that is specifically designed for parallelism. Personally I've always found C and POSIX threads more than adequate.
          • Re: (Score:3, Informative)

            by tedgyz ( 515156 ) *
            I should have said: Most problems do not EASILY parallelize to large scales.

            In regards to your comments about mediocre programmers...

            You do not recognize the fact that most programmers are mediocre. You can scream at them that it is easy, but they will still end up staring at you like deer in the headlights.

            Sorry - we are entering the "Model T" mass production era of software.
            • Re: (Score:3, Interesting)

              by Gr8Apes ( 679165 )

              I should have said: Most problems do not EASILY parallelize to large scales. ... You do not recognize the fact that most programmers are mediocre. You can scream at them that it is easy, but they will still end up staring at you like deer in the headlights.

              Sorry - we are entering the "Model T" mass production era of software.

              First, no one said parallelism is easy (in this thread anyways). I don't care that most "programmers" are mediocre and will never be able to understand parallelism, much like I don't care that most native English speaking Americans will never be able to understand nor speak Mandarin Chinese. They have about the same relevance to parallel programming as we're not talking about the masses being able to do parallel programming, speak Mandarin, or make Model Ts, for that matter.

              Speaking of your "Model T" mass

            • Re:Duh? (Score:5, Informative)

              by CastrTroy ( 595695 ) on Tuesday March 25, 2008 @08:07AM (#22855942)
              Most people who do anything are mediocre. Otherwise, mediocre would be redefined. It's like saying, half the people in the class scored below average. The fact that half the people scored below some value determines what the value of average is.
          • Name a single real world problem that doesn't parallelize.

            Handling event propagation through a hierachy of user interface elements.
          • Re:Duh? (Score:4, Informative)

            by smallfries ( 601545 ) on Tuesday March 25, 2008 @07:44AM (#22855766) Homepage
            What do you mean by "parallelize well"? Normally people would use that phrase to imply fine-grained parallelism in the problem but I suspect that you are using it differently. For example when you say that compilation parallelizes well are you talking about coarse-grain parallelism across compilation-units? This is not really a single instance of a problem being computed in parallel, but rather many independent instances of a problem. If you are willing to use many independent instances of a problem then the coarse-grain parallelism will always scale "well" - i.e linearly in the number of cores. But this does not provide a speedup in many real-world applications.

            In your compilation example, it is easy to get speedups at the compilation level using something like make -jN. But this assumes that each unit is independent. If you want to apply advanced global optimisations then this is not always the case, and then you hit the harder problem of parallelizing the compilation algorithms rather than just running multiple instances. It's not impossible but I'm not aware of any commercial compilers that do this.

          • by oni ( 41625 ) on Tuesday March 25, 2008 @08:09AM (#22855948) Homepage
            > Name a single real world problem that doesn't parallelize.

            Childbirth. Regardless of how many women you assign to the task, it still takes nine months.

            (feel free to reply with snark, but that's a quote from Fred Brooks, so if your snarky reply makes it look like you haven't heard the quote before you will seem foolish)
          • For your examples you threw out a bunch of problems that are currently being parallelized just fine by today's software, which would indicate we're not having problems with parallel programming. Name a search engine, database query engine, weather simulation software, etc, that isn't already multithreaded. Where's the issue?

            Problems that can and should be parallelized in software already are for the most part. There is no issue here.

            Business processes are often serial (step B depends on output of step A)
          • Re: (Score:3, Insightful)

            by kscguru ( 551278 )

            Name a single real world problem that doesn't parallelize. I've asked this question on slashdot on several occasions and I've never received a positive reply.

            GUIs (main event loop) for word processors, web browsers, etc. (Java feels slow because GUI code in Java is slower than human perception). Compilation (see below - it's a serial problem with a just-good-enough parallel solution). State machine simulations like virtualization or emulation. Basically, any task where the principle unit of work is either processing human input or complex state transitions. Only numerical simulations - problems with simple state transitions - parallelize well.

            Real world problems like search, FEA, neural nets, compilation, database queries and weather simulation all parallelize well. Problems like orbital mechanics don't parallelize as easily but then they don't need parallelism to achieve bounded answers in faster than real time.

            FEA, neural

      • by martincmartin ( 1094173 ) on Tuesday March 25, 2008 @07:21AM (#22855576)
        It always surprizes me how many people say "we have to multithread our code, because computer are getting more cores," not realizing:
        1. There are often other ways to do it, e.g. multiple processes communicating over sockets, or multiple processes that share memory.
        2. Threads are hard to get right. Really, really hard. [faqs.org]
        When your library of mutexes, semaphores, etc. doesn't have exactly the construct you need, and you go to write your own on top of them, it's really, really hard not to introduce serious bugs that only show up very rarely. As one random example, consider the Linux kernel team's attempts to write a mutex, as descried in Ulrich Drepper's paper "Futexes are Tricky." [redhat.com]

        If these people take years to get it right, what makes you think *you* can get it right in a reasonable time?

        The irony is that threads are only practical (from a correctness/debugging point of view) when there isn't much interaction between the threads.

        By the way, I got that link from Drepper's excellent "What Every Programmer Should Know about Memory." [redhat.com] It also talks about how threading can slow things down.

    • Re: (Score:2, Insightful)

      by dubl-u ( 51156 ) *
      "Science progresses one funeral at a time." - Max Planck

      Software might be slightly better, as Moore's Law has been prodding us forward. On the other hand, given the number of us working in C-like languages (35+ years old), maybe with an OO twist (25+ years), to do web stuff (15-ish years), one funeral at a time might be more than we can manage. Legacy code, alas, can outlive its authors.
    • Re:Duh? (Score:5, Interesting)

      by dltaylor ( 7510 ) on Tuesday March 25, 2008 @05:07AM (#22854944)
      Spoken like a completely ignorant child. How the hell do you think (if you even can) we older guys got into this business? We were tinkering with new things, using them when appropriate, before many of you were born, and the joy of new ideas hasn't worn off. The only difference is we don't do it quite so impulsively, just because it seems new.

      For one thing, multiple homogeneous cores is NOT new (hetero- either, for that matter), just fitting them into the same die. I've used quad 68040 systems, where, due to the ability of the CPUs to exchange data between their copy-back caches, some frequently-used data items were NEVER written to memory, and on System V you could couple processing as tightly or loosely as you wanted. There are some problem sets that take advantage of in-"job" multi-processing better than others, just as some problem sets will take of advantage of multiple cores by doing completely different tasks simultaneously. Simple (very) example: copying all of the files between volumes (not a block-for-block clone); if I have two cores, I can can either have a multi-threaded equivalent of "cp" which walks the directory tree of the source and dispatches the create/copy jobs in parallel, each core dropping into the kernel as needed, or I can start a "cpio -o" on one core and pipe it to a "cpio -i" on the other, with a decent block size on the pipe. More cores means more dispatch threads in the first case, and background horsepower handling the low-level disk I/O in the other. In my experience, the "cpio" case works better than the multi-threaded "cp" (due, AFAICT, to the locks on the destination directories).
    • Wait - you mean I can't just add a compiler switch and get parallel processor support? Dammit! This sounds hard! Damn you Technical Progress - Damn you!
    • by colmore ( 56499 )
      Huh, and according to obvious things that don't surprise anyone who think about them for more than five minutes, most COBOL programmers are members of AARP.

      Outside of the older, first world programming communities, there are far more young people to old people. Old programmers typically make their living by having a resume with years of experience in a technology or three that aren't going anywhere (you'll be able to keep a roof over your head for the next 50 years keeping Java business systems running.)
    • Oversimplified (Score:4, Insightful)

      by Moraelin ( 679338 ) on Tuesday March 25, 2008 @07:00AM (#22855424) Journal
      That's an oversimplified view.

      It's more like when you've got enough experience, you already know what can go wrong, and why doing something might be... well, not necessarily a bad idea, but cost more and be less efficient anyway. You start having some clue, for example, what happens when your 1000 thread program has to access a shared piece of data.

      E.g., let's say we write a massively multi-threaded shooter game. Each player is a separate thread, and we'll throw in a few extra threads for other stuff. What happens when I shoot at you? If your thread was updating your coordinates just as mine was calculating if I hit, very funny effects can happen. If the rendering is a separate thread too, and reads such mangled coordinates, you'll have enemies blinking into strange places on your screen. If the physics or collision detection does the same, that-a-way lies falling under the map and even more annoying stuff.

      Debugging it gets even funnier, since some race conditions can happen once a year on one computer configuration, but every 5 minutes on some hapless user's. Most will not even happen while you're single-stepping through the program.

      Now I'm not saying either of that is unsolvable. Just that when you have a given time and budget for that project, it's quite easy to see how the cool, hip and bleeding-edge solution would overrun that.

      By comparison, well, I can't speak for all young 'uns, but I can say that _I_ was a lot more irresponsible as the stereotypical precocious kid. I did dumb things just because I didn't know any better, and/or wasted time reinventing the wheel with another framework just because it was fun. All this on the background of thinking that I'm such a genius that obviously _my_ version of the wheel will be better than that built by a company with 20 years of experience in the field. And that if I don't feel like using some best practice, 'cause it's boring, then I know better than those boring old farts, and they're probably doing it just to be paid for more hours.

      Of course, that didn't stop my programs from crashing or doing other funny things, but no need to get hung up on that, right?

      And I see the same in a lot of hotshots nowadays. They do dumb stuff just because it's more fun to play with new stuff, than just do their job. I can't be too mad at them, because I used to do the same. But make no mistake, it _is_ a form of computer gaming, not being t3h 1337 uber-h4xx0r.

      At any rate, rest assured that some of us old guys still know how to spawn a thread, because that's what it boils down to. I even get into disputes with some of my colleagues because they think I use threads too often. And there are plenty of frameworks which do that for you, so you don't have to get your own hands dirty. E.g., everyone who's ever wrote a web application, guess what? It's a parallel application, only it's the server which spawns your threads.
      • Re: (Score:3, Informative)

        by Nursie ( 632944 )
        "E.g., let's say we write a massively multi-threaded shooter game. Each player is a separate thread,"

        Well there's your first mistake.
        That's a recipe for disaster and built in limits to the number of players.

        Ideally you seperate up your server app into multiple discrete jobs and process them with a thread pool. I don't know how well that maps to gaming but many server apps work very well with that paradigm.
      • Re: (Score:3, Informative)

        by Coryoth ( 254751 )

        E.g., let's say we write a massively multi-threaded shooter game....Debugging it gets even funnier, since some race conditions can happen once a year on one computer configuration, but every 5 minutes on some hapless user's. Most will not even happen while you're single-stepping through the program

        Well that just says that you're doing it wrong. Sure, a massively concurrent system done in the manner you describe would be incredibly tricky to make work correctly. Of course that's not the only way to do it. With a little bit of thought and analysis going in you can write massively concurrent multi player games that just work right first time [usu.edu]. That's a system that had literally thousands of concurrent processes all interacting, with no deadlock or livelock, and no complex debugging to ensure that was th

  • by BadAnalogyGuy ( 945258 ) <BadAnalogyGuy@gmail.com> on Tuesday March 25, 2008 @02:51AM (#22854476)
    Which is more efficacious? To take up as much simultaneous processor time as possible in order to finish faster, or to leave extra cores open for other processes to run simultaneously.

    Given that the management of threads isn't exactly the easiest thing in the world (not the hardest either, mind you), perhaps it would be more beneficial to let the OS determine which threads to run rather than trying to optimize a single app.

    For example, many webservers use a semaphore rather than multiple threads to handle request dispatch. The result is that there is less overhead creating and cleaning up threads.
    • by BSAtHome ( 455370 ) on Tuesday March 25, 2008 @03:06AM (#22854532)
      Multiple cores plus less experienced programmers results multiple infinite loops able to run at the same time. I don't quite see how this helps quality software, regardless of the synchronization problem.
      • Re: (Score:3, Funny)

        I don't quite see how this helps quality software

        Sure, but you can now run your infinite loops in half the time as before.

        Halving the time to run an operation? That's improving quality, right there.
      • by RuBLed ( 995686 )
        Ha! But you see lad, nobody had any proof that a program with an Infinite Loop would run infinitely.

        So there, myth busted, show me your infinite loop and I'd show you my sledgehammer...
    • by SanityInAnarchy ( 655584 ) <ninja@slaphack.com> on Tuesday March 25, 2008 @03:44AM (#22854654) Journal
      It depends on the application. Some applications simply benefit from running in realtime. And some applications don't really scale well by breaking them up into individual processes. Some applications want to use as much CPU as you can throw at them -- a web app, for instance, had better be able to handle another few (dozen?) app servers if you get Slashdotted.

      Also: Management of threads is mostly hard because we're mostly still using such low-level tools to do it. Semaphores, locks, and threads are the equivalent of GOTOs, labels, and pointers. While you can build a higher-level system (message-passing, map/reduce, coroutines) out of semaphores, locks, and threads, I'd argue that's like writing everything in GOTOs instead of doing a proper for loop -- or using a for loop instead of a proper Ruby-style "each" iterator. At the risk of abusing my analogy, yes, sometimes you do want to get under the hood (pointers, threads), but in general, it's much safer, saner, and not that much less efficient to use modern parallel programming concepts.

      There's still some real problems with pretty much any threaded system, but I suspect that a lot of the bad rap threads get is from insufficient threading tools.

      Oh, and about that webserver -- using more than one process is pretty much like using more than one thread, and I'd say weighs about the same in this discussion. Webservers, so far, are able to get away with using one thread (or process, doesn't matter) per request (and queuing up requests if there's too many), so that's a bit less of a problem than, say, raytracing, compiling, encoding/decoding video, etc.
      • Re: (Score:3, Interesting)

        Regarding the webserver, I am arguing the opposite, though. The single-threaded, event-driven architecture allows the server itself to remain relatively lightweight. Some webservers certainly do use threads and optimize that further by using a threadpool, but threads are still more cumbersome for an application like that which has mandatory blocking while the hardware is busy doing stuff (tx or rx).

        The rest of your post, I am in agreement. I used to work on a very large high profile application framework. I
      • There are two problems: thread sychronization, and race conditions.

        Race conditions
        A modern CPU architecture uses multiple levels of cache, which aggrivate the race condition [wikipedia.org] scenario. For a programmer to code multi-threaded code, and "not-worry", then the architecture must always read and write every value to memory. This worst case scenario is only needed in a tiny fraction of cases. So the compiler can do much better by working with the memory model [wikipedia.org] of the architecture, instead of assuming that no m

    • Re: (Score:3, Interesting)

      by rbanffy ( 584143 )
      "Which is more efficacious? To take up as much simultaneous processor time as possible in order to finish faster, or to leave extra cores open for other processes to run simultaneously."

      This is up to the OS to decide. The programmer's job is to provide something for the processors to do. If doing it serially is wasteful, doing it in parallel (or, at least, asynchronously) is the way to go.

      Of course, when you think parallel and threads rely on each other's data, you need a suite of tests that can test it pro
  • Questions (Score:5, Funny)

    by Hal_Porter ( 817932 ) on Tuesday March 25, 2008 @02:54AM (#22854490)
    Q1) Why did the multithreaded chicken cross the road?
    A1) to To other side. get the

    Q2) Why did the multithreaded chicken cross the road?
    A4) other to side. To the get

    It is funnier in the original Russian.
    • I DON'T KNOW WHY, BUT I CAN'T STOP LAUGHING AT THAT! Could just be that it's so late, but damnit, that's funny
    • by RuBLed ( 995686 ) on Tuesday March 25, 2008 @04:55AM (#22854898)
      Whoa..

      Q: How many multithreaded person(s) does it take to change a light bulb?
      A: 5, 1 at each of the 4 ladders and 1 to pass the light bulb to the lucky one.

      Q: How many multithreaded person(s) does it take to change a light bulb?
      A: 4, each trying to screw the lightbulb.

      Q: How many multithreaded person(s) does it take to change a light bulb?
      A: I don't know what happened to them.
  • Experince (Score:5, Interesting)

    by forgoil ( 104808 ) on Tuesday March 25, 2008 @02:55AM (#22854492) Homepage
    One reason could be that software engineers with more experience simply already know about these things, and have faced off against the many problems with concurrency. Threads can be hell to deal with for instance. So because of things they don't show any interest.

    That being said I think that if you want to actually make use of many cores you really do have to switch to a language that can give you usage of many threads for free. Writing it manually usually ends up with complications. I find Erlang to be pretty nifty when it comes to these things for instance.
    • ne reason could be that software engineers with more experience simply already know about these things, and have faced off against the many problems with concurrency. Threads can be hell to deal with for instance. So because of things they don't show any interest.

      I think to make programming too different from natural human thought processes will result in less manageable code and probably less performance & profit for effort. Multithreading within an application is great for some things, like heavy mathematical tasks that aren't strictly linear, predictable jobs which can be broken up and pieced together later, etc. But why should programmers be forced to learn how to do this? I think it's up to operating systems and compilers to work this out, really. The poi

      • I think to make programming too different from natural human thought processes will result in less manageable code and probably less performance & profit for effort.

        Human brains are not like brains and are not serial oriented:
        http://scienceblogs.com/developingintelligence/2007/03/why_the_brain_is_not_like_a_co.php [scienceblogs.com]

        But our conscious mind might be.

        But why should programmers be forced to learn how to do this?

        For the same reason a programmer should learn anything -- to understand what is going on in the back

        • For the same reason a programmer should learn anything -- to understand what is going on in the background.

          Understanding is fine, but having to take into consideration that your threaded app needs to be able to run on a single, dual, n^2 core processors, putting in contingencies and trying to slice up your code for this purpose and at the same time making it readable and logical to onlookers, is a bit rich.

          It's not the job of a C++ programmer to have to take into account where in memory their code might be running, or even what operating system is running, in many instances (of course they should be allowed t

          • Of course, one of the responsibilities of a programmer is to use the right tool for the job and C++ is not it in this case. (I acknowledge that some don't have the luxury to choose.)
    • Another reason could be that we're old programmers: we know better than to stick our fingers into the moving lawnmower blades of multi-processor technologies.
    • Interestingly, Microsoft seems really interested [moneyweb.co.za] in providing the right framework to "take advantage of the multicore architectures while solving the most common problems with concurrency. Their Research Labs are doing a lot of good work with experimental language features [tomasp.net], and many of them are getting their way into the .Net platform [reddevnews.com].

      This makes sense coming from this company, since one of their strong points always has been creating good development environments for the not-highly-specialized programmers o
  • Most of my past projects I had adapted or rewritten to use threads. Keeping data coherent when one thread or process can interrupt another is hard -- maybe that's why it's not done more?

    And what about seti@home, folding@home, and all the other massively parallel projects out there? Surely you're not saying that doesn't apply to multi-core either. I think that if you stop and look around you'll see it. But if you're only basing your opinion on your book sales, then maybe there's another problem.
  • by Cordath ( 581672 ) on Tuesday March 25, 2008 @03:01AM (#22854524)
    Parallel programming is going to go mainstream, not because people find it interesting, but because that's the way hardware is forcing us to go. First mainframes, then workstations, and now desktops and laptops have moved away from single CPU cores. In every case, it has been a necessary evil due to the inability to pack enough power into a single monolithic processor. Does anyone actually think Intel, if they could, wouldn't happily go back to building single-core CPU's with the same total power as the multi-core CPU's they're making now?

    Right now, parallel development techniques, education, and tools are all lagging behind the hardware reality. Relatively few applications currently make even remotely efficient use of multiple cores, and that includes embarrassingly parallel code that would require only minor code changes to run in parallel and no changes to the base algorithm at all.

    However, if you look around, the tools are materializing. Parallel programming skills will be in hot demand shortly. It's just a matter of time before the multi-core install base is large enough that software companies can't ignore it.
    • You just haven't noticed.

      Multi process apps have been common in the business and server app space for almost two decades.
      Multi thread apps have been common in the business and server world for a few years now too.

      To all having the will it/won't it go mainstream argument: You missed the boat. It's mainstream.
  • by MOBE2001 ( 263700 ) on Tuesday March 25, 2008 @03:07AM (#22854534) Homepage Journal
    One day soon, the computer industry will realize that, 150 years after Charles Babbage came up with his idea of a general purpose sequential computer, it is time to move on and change to a new computing model. The industry will be dragged kicking and screaming into the 21st century. For over 20 years, researchers in parallel and high-performance computing have tried to come up with an easy way to use threads for parallel programming. They have failed and they have failed miserably. Amazingly, they are still continuing to pursue the multithreading approach. None other than Dan Reed, Director of scalable and multicore computing at Microsoft Research, believes that multithreading over time will become part of the skill set of every professional software developer (source: cio.com [cio.com]). What is wrong with this picture? Threads are a major disaster: They are coarse-grained, they are a pain in the ass to write and hard to debug and maintain. Reinders knows this. He's pushing threads, not because he wants your code to run faster but because Intel's multicore CPUs are useless for non-threaded apps.

    Reinders is not an evangelist for nothing. He's more concerned about future-proofing Intel's processors than anything else. You listen to him at your own risk because the industry's current multicore strategy will fail and it will fail miserably.

    Threads were never meant to be the basis of a parallel computing model but as a mechanism to execute sequential code concurrently. To find out why multithreading is not part of the future of parallel programming, read Nightmare on Core Street [blogspot.com]. There is better way to achieve fine-grain, deterministic parallelism without threads.

    • Re: (Score:2, Insightful)

      by Anonymous Coward
      The theory of fine-grained parallelism is fundamentally flawed by the fact that parallelisation itself incurs an overhead, due to locking and syncing shared data structures.

      Your COSA stuff has already been investigated by researchers before. Basically, describing functional programming in a graph doesn't achieve anything. And if you want to parallelise like this (which is still nowhere near as efficient as hand-optimised coarse-grained parallelisation):

      Core 1 Core 2

      (2*3) + (4*6)
      (6+24)

      you'll probabl
    • Threads were never meant to be the basis of a parallel computing model but as a mechanism to execute sequential code concurrently. To find out why multithreading is not part of the future of parallel programming, read Nightmare on Core Street. There is better way to achieve fine-grain, deterministic parallelism without threads.

      You have it exactly right, but I don't think multicore processing is going away soon. Rather, I think the solution will be in things like hypervisors and changes in kernels, etc, to allocate resources in a responsible way. Multicore CPU's don't have to be useless, but this time it's a case of the mountain needing to come to Mohammad, not the other way around.

    • Wow, I thought it was interesting the first time [slashdot.org] I saw you say it -- but a quick Google turns it up again. [technewsworld.com]

      Really, a copy/paste troll on threading? WTF?

      And yes, I'm calling it a troll unless you stop quoting that "150 years after Charles Babbage" BS, and start making your point within the comment, instead of in a rambling five-page blog post which links to a rambling whitepaper, at the end of which, we finally get a vague idea of what you might be talking about -- and we find that it's not really relevant to
    • by bhima ( 46039 ) *
      I gotta say that link (and thus your post) is a whole lot hyperbole and a whole lot of text to get one link to the project Cosa: http://www.rebelscience.org/Cosas/COSA.htm [rebelscience.org]

      The project itself I suppose is pretty interesting...

      But I'll not beleive the everyone in computer science since Charles Babbage was wrong BS until the entire industry is using the model proposed.
  • by Opportunist ( 166417 ) on Tuesday March 25, 2008 @03:11AM (#22854560)
    Whether it's a good idea or not, you will have a VERY hard time convincing an old dog programmer that he should jump on the train. Think back to the time when relational models entered the database world.

    Ok, few here are old enough to be able to. But take object oriented programming. I'm fairly sure a few will remember the pre-OO days. "What is that good for?" was the most neutral question you might have heard. "Bunch o' bloated bollocks for kids that can't code cleanly" is maybe more like the average comment from an old programmer.

    Well, just like in those two cases, what I see is times when it's useful and times when you're better off with the old ways. If you NEED all the processing power a machine can offer you, in time critical applications that need as much horsepower as you can muster (i.e. games), you will pretty much have to parallelize as much as you can. Although until we have rock solid compilers that can make use of multiple cores without causing unwanted side effects (and we're far from that), you might want to stay with serial computing for tasks that needn't be finished DAMN RIGHT NOW, but have to be DAMN RIGHT, no matter what.
    • Interestingly, Microsoft knows that, and they seem really interested [moneyweb.co.za] in providing the right framework to "take advantage of the multicore architectures while solving the most common problems with concurrency.

      Their Research Labs are doing a lot of good work with experimental language features [tomasp.net], and many of them are getting their way into the .Net platform [reddevnews.com].

      This makes sense coming from this company, since one of their strong points always has been creating good development environments for the not-highly-specia
    • "Bunch o' bloated bollocks for kids that can't code cleanly" is maybe more like the average comment from an old programmer.

      To an extent they were right - remember at the time OO was being pushed as the ultimate answer to life, the Universe and Everything. If you read some of the more academic OO books even today they truly are "a Bunch o' bloated bollocks".

      Then there was UML, Webservices, XML, Threading, Java, .NET... all have been pushed in the same way. Seems to be part of the lifecycle that technologie
  • by Goalie_Ca ( 584234 ) on Tuesday March 25, 2008 @03:29AM (#22854620)
    I'm writing a scientific library that is supposed to scale for many many cores. Using a mutex lock is not an option. Unfortunately right now I am spending all my time trying to figure out how to get compare and swap working on all the different platforms. I am saddened to see the lack of support since this is such a fundamental operation. Also, the whole 32 vs 64-bit thing adds more pain because of pointer size.
    • Re: (Score:2, Interesting)

      by nten ( 709128 )
      As you say atomic pointer swaps are often not an option. And if you have to rule out mutex locks for timing or some other reason, I think you may be down to functional programming. If you eliminate objects with state and just pass everything by value (make copies on the calling thread to hand to the called), it can solve the problem, but it can cost a load in memory access times. Wiki the buzzphrase "referential transparency"
  • They did most of the early work on which almost all modern parallelism is based. America has tended to follow the notion of faster sequential processing, as the cost savings were not a major factor for universities who could afford big, bright labels. And that's all it's been - playing at which kid gets the toy with the biggest label. Not all, by any means, but a lot. Beowulf clusters, PVM, OpenMPI, Unified Parallel C, Charm++, Cilk, Erlang, Myrinet, Infiniband, RDMA, iWARP... All dveloped in America and al
    • by Anonymous Coward
      It's only been twelve years since I entered the workforce in the US, but I have been studying parallel programming for almost 15 years (three years in university).

      The future isn't "multi-threaded" unless you count SPMD, because architecturally the notion of coherent shared memory is always going to be an expensive crutch. Real high-performance stuff will continue to work with distributed, local memory pools and fast inter-node communication... whether the nodes are all on chip, on bus, in the box, in the da
      • by jd ( 1658 )
        You don't sound elitist at all. If anything, a little generous. When people multithread and those threads use their own data and own logic, you have a MIMD solution. If they're trivial threads, you may be ok. Otherwise, the number of people who can understand all of the synchronisation and timing issues involved in MIMD... well, pick a number, divide it by itself, subtract 1.

        (This is why most people stick with SIMD for local computing and MISD for grids.)

        Those using MPI for parallelization are probably

  • by supersnail ( 106701 ) on Tuesday March 25, 2008 @03:52AM (#22854678)
    One of the reasons more seasoned programmers are not particularly interested is that in most cases someone else has already doen the hard work.

    Want to serve multiple user on multiple cpus with your web pages? Then write a single threaded program and let Apache handle the parallelism. Same goes for JavaEE, database triggers, etc. etc. going all the way back to good old CICS and COBOL.

    It is very rare that you actually need to do parallel programing yourself. Either you are doing some TP monitor like program which schedules tasks other people have written in which case you should use use C and POSIX threads (anything else will land you in deep sewage) or you are doing serious science stuff in which case there are several "standard" fortran libraries to do multithreaded matrix math -- but if the workload is "serious" you should be looking at clustering anyway.
             
    • Those containers do hide some of the complexity of parallel programming, but the programmer still needs a basic understanding to produce a usable result.

      This whole article smells of hype...
    • "One of the reasons more seasoned programmers are not particularly interested is that in most cases someone else has already doen the hard work."

      Who is this mythical "someone else"? I'd like to meet them. Incidentaly since when have database triggers been parallel systems? The LAST thing you want in a database is these sort of things running parallel, thats why you have locking!

      "It is very rare that you actually need to do parallel programing yourself."

      Err , if you count threads as parallel programming then
    • Re: (Score:3, Interesting)

      by master_p ( 608214 )
      It all depends from where you stand. If your bread and butter is business applications, then indeed it's rare to having to deal with threads. But for almost everything else, threading is a necessity. I am a programmer in the field of defense applications, and I never ever worked in a single-threaded application. And if you look around, almost all applications have some sort of parallelism (examples: Word when re-paginating long documents, Firefox with multiple tabs, Excel running long computations, Torrent
  • Not So Great (Score:4, Insightful)

    by yams ( 637038 ) on Tuesday March 25, 2008 @04:06AM (#22854718) Homepage Journal

    Been there, done that. Good from far, but far from good.

    As an engineer straight out of college, I was very interested in parallel programming. In fact, we were doing a project on parallel databases. My take is that it sounds very appealing, but once you dig deeper, you realise that there are too many gotchas.

    Considering the typical work-time problem, let's say a piece of work takes n seconds to complete by 1 processor. If there are m processors, the work gets completed in n/m seconds. Unless the parallel system can somehow do better than this, it is usually not worth the effort. If the work is perfectly divisible between m processors, then why have a parallel system? Why not a distributed system (like beowulf, etc.)?

    If it is not perfectly distributable, the code can get really complicated. Although it might be very interesting to solve mathematically, it is not worth the effort, if the benefit is only 'm'. This is because, as per Moore's law [wikipedia.org], the speed of the processor will catch up in k*log m years. So, in k*log m years, you will be left with an unmaintainable piece of code which will be running as fast as a serial program running on more modern hardware.

    If the parallel system increases the speed factor better than 'm', such as by k^m, the solution is viable. However, there aren't many problems that have such a dramtic improvement.

    What may be interesting are algorithms that take serial algorithms and parallelise them. However, most thread scheduling implementations already do this (old shell scripts can also utilise parallel processing using these techniques). Today's emphasis is on writing simple code that will require less maintenance, than on linear performance increase.

    The only other economic benefit I can think of is economy of volumes. If you can get 4GHz of processing power for 1.5 times the cost of a 2GHz processor, it might be worth thinking about it.

    • Considering the typical work-time problem, let's say a piece of work takes n seconds to complete by 1 processor. If there are m processors, the work gets completed in n/m seconds. Unless the parallel system can somehow do better than this, it is usually not worth the effort. If the work is perfectly divisible between m processors, then why have a parallel system? Why not a distributed system (like beowulf, etc.)?

      Wait, what? How is this insightful? If you have a piece of work that can be completed faster by using multiple processors concurrently... why that sounds an awful lot like parallel processing! Also, to say that a problem that takes N seconds to complete with 1 processor takes N/M seconds to complete with M processors is just plain wrong. N/M seconds would be amount of time taken by a theoretically 'perfect' setup; it cannot be achieved in practice (I am fairly certain, can someone correct me if I'm wr

      • by TERdON ( 862570 )
        N/M seconds would be amount of time taken by a theoretically 'perfect' setup; it cannot be achieved in practice (I am fairly certain, can someone correct me if I'm wrong?).

        You're wrong. It can be achieved (in particular cases). It can even sometimes be surpassed - but then it's because of some superlinear effect - like the work being exactly the right size to not fit into cache or RAM on one processor, but being small enough to fit when distributed, so when distribution is used the cache is effectively used
        • It can be achieved (in particular cases). It can even sometimes be surpassed [...] Theoretically, the limit shouldn't be surpassable (and very hard to actually reach).
          I was with you until that, what do you mean?
    • The original version of the Law said that gate density doubles every N months (12In case you hadn't noticed, web2.0 is largely about systems running many, many similar processes in parallel. These processes are usually quite independent. (Even on my laptop, running an Ethernet connection has little to do with editing a document on the hard drive.)

      If you are working on a single user system such as a word processor, parallelism has little significance. But if you are a Google, wanting to deliver similar but i

    • What you say is true, but only on the surface. If you dig deeper, you will see that many programs contain plenty of opportunities for parallelization.

      One algorithm that can be greatly parallelized is that of searching, which is a very frequent operation in all shorts of applications. Instead of searching all data, finding the result and then applying the required job on it, in a parallel environment the job can be executed as one of the threads finds the result; which means speeding up executions in tree an
  • And I am very actively considering whether we need to redesign core parts of our systems in Erlang, largely as a result of looking at the ejabberd XMPP server. My suspicion is that what we are seeing here may be more to do with the kind of work being done in different regions and by people at different experience levels. Work in the US and Europe is perhaps more likely to be user-facing, older programmers more likely to be developing end-user applications or working at the architectural level. Concurrency i
  • Whats left in the USA?
    The great 1960's and 70's engineering generations?
    The DoD Ada people?

    You now have generation wintel.
    Dumbed-down, corporatized C coders.
    One useless OS on a one or 4 core chip.
    When game makers and gpu makers want to keep you in the past due to
    the lack of developer skill you know you have problems.

    The rest of the world may not have the best hardware, but they do try and educate the
    next generation
    • by Nursie ( 632944 )
      Hey, I'm a "Dumbed-down, corporatized C coder" and I've been working on threaded, parallel and distributed systems for the last 8 years!

      Maybe I'm not that dumbed down, but we are out there and I don't think I'm particularly special...
  • Been using multithread and/or multiprocess programming my whole career (about 8 years now). I don't know if it generalises to the whole of the US but I'm always astounded at the attitude of people on slashdot to parallel programming.

    We hear over and over again "it's not goping to go mainstream", "it's hard to get right", "threads are a recipe for disaster", "synchronisation is just too much work to debug", "it's a niche area" etc etc

    Even occasionally "It'll never take off".

    Well, guys, it has. A lot of peopl
  • by Aceticon ( 140883 ) on Tuesday March 25, 2008 @05:39AM (#22855084)
    Those of us doing server side development for any medium to large company will have already been doing multi-threaded and/or multi-process applications for ages now:
    - When Intel was still a barely known brand, other companies were already selling heavy-iron machines with multiple CPUs for use in heavy server-side environments (didn't ran Windows though). Multi-cores are just a variant of the multiple-CPU concept.

    The spread of Web applications just made highly multi-threaded server-side apps even more widespread - they tend naturally to have multiple concurrent users (<rant>though some web-app developers seem to be sadly unaware of the innate multi-threadness of their applications ... until "strange" problems start randomly to pop-up</rant>).

    As for thick client apps, for anything but the simplest programs one always needs at least 2 threads, one for GUI painting and another one for processing (either that or some fancy juggling a la Windows 3.1)

    So, does this article means that Japan, China, India and Russia had no multi-CPU machines until now ... or is this just part of a PR campaign to sell an architecture which, in desktops, is fast growing beyond it's usefulness (a bit like razors with 4 and 5 blades)
  • Most comments so far seem to concern the type of problems we've dealt with in the past, but there is another type of problem that is emerging. This new type tends to deal with short computations on vast amounts of data rather than long computations on small amounts of data, as we're used to. A few examples;

    SDR, software defined radio. One of these can easily saturate a gigabit ethernet link with data, and we'll want the computer to automatically sort signal from noise, and determine if we're interested in t
  • While most replies seem to go around just "young kids tend to jump on new things" "parallelism has been here for years in inherently parallelizable tasks such as server or graphics", I managed to read TFA, and voila...

    >my Threading Building Blocks (TBB) book, sold more copies in Japan in Japanese
    >in a few weeks than in the first few months worldwide in the English vesion
    >(in fact - it sold out in Japan - surprising the publisher!)

    >contributors and users of the TBB open source project are worldwi
  • The other day I realized that I don't really know why threads are supposed to be better than processes, other than because "multithreading" sounds cooler and it's not old and boring and well-understood like "multiprocessing". I'm asking this sincerely: why do people only talk about multithreaded processing whenever parallel programming comes up lately? It seems like IPC is marginally easy with threads but that design is much trickier, so what's the big win? Is it a CPU optimization thing?

  • by pcause ( 209643 ) on Tuesday March 25, 2008 @07:42AM (#22855748)
    Parallel programming is simply harder than typical sequential programming. Not only does the design take more time and effort, but the debugging is VERY much harder. tools for parallel programming are poor but debugging tools are basically pathetic. Worse, today's project and development methodologies don't focus on getting something up and hacking, not on careful upfront design that is needed to really parallelize things. We get most of our parallelism from the web server being multi-threaded and the database handling concurrency.

    As many have said, large scale parallel systems are not new. Just because we need a solution to the problem doesn't mean that it will appear any time soon. Some problems are very difficult and involve not only new technologies and programing models but major re-educational efforts. There are many topics in physics and mathematics that only a small number of people have the intellectual skill and predilection to handle. Of all the college graduates, what percent complete calculus, let alone take advanced calculus? Pretty small number.

    My prediction is that the broad base of programmers will have the tools and be able to do some basic parallelism. A small number of programmers will do the heavy duty parallel programming and this will be focus on very high value problems.

    BTW, this Intel guy, while addressing a real issue, seemed to be doing marketing for his toolkit/approach. Sounds like a guy trying to secure his budget and grow it for next year.
  • Anybody else remember the great clock cycle stall of the 1980's? During that period, Moore's Law operated in a manner closer to its original statement - the big news was the drop in cost per transistor, not raw CPU speed. The general wisdom at the time was that parallelism was going to be the way to get performance.

    And then, we entered the die shrink and clock speed up era, clock speeds doubled every 14 months or so for ten years, and we went smoothly from 60 MHz to 2 GHz. Much of the enthusiasm for parallel programming died away - why sweat blood making a parallel computer when you can wait a few years and get most of the same performance?

    Clock speeds hit a wall again about five years ago. If the rate of increase stays small for another five years, the current cycle drought will have outlasted the 1980's slowdown. I have a great deal of sympathy for parallel enthusiasm (I hacked on a cluster of 256 Z80's in the early 80's), but I think it won't really take off until we really have no other choice, because parallelism is hard.

Never tell people how to do things. Tell them WHAT to do and they will surprise you with their ingenuity. -- Gen. George S. Patton, Jr.

Working...