Concurrent Programming Über Alles

Posted by on in Blogs
With more processor cores to leverage, we can’t defer all the work to the operating system, virtual machine, and threading API(s). In order to take full advantage of these architectures, we will have to re-engineer our software development efforts to take full advantage of the growing ubiquity of parallel processing power in every server, desktop, and device.

OpenMP gives us an simple, portable, scalable API that supports multi-platform shared-memory parallel programming for C++ and Fortran. Intel’s Threaded Building Blocks (TBB), now open source, provides a C++ runtime library that abstracts the low-level threading details necessary for optimal multi-core performance.

Professor Maurice Herlihy at Brown University is doing research centered on practical and theoretical aspects of multiprocessor synchronization, with a focus on wait-free and lock-free synchronization. Search for Transactional Memory, Hardware and software approaches to scalable multiprocessor synchronization.

Bjarne Stroustrup talks about concurent programming in a paper titled, "The design of C++0x". In the article, he says, "It is also obvious that some support for concurrency is needed as many forms of concurrent, parallel, and distributed programming are becoming common. The diversity of such approaches and techniques implies that no single mechanism can adequately cover all applications. Thus, the obvious approach is to provide very simple language mechanisms supported by libraries (built generic and objectoriented techniques)." The C++0x committee is working next week in Kona Hawaii to finish a draft and make it available for ISO's year long comment period.

At CodeGear, the R&D team is exploring what work should be done with the Delphi language to support concurrent programming. The Delphi and C++Builder roadmap document mentions that multi-core and multi-threaded development is under consideration for future versions of Delphi and C++Builder products.

Java concurrent programming for Java5 starts with JSR 166, Concurrency Utilities, that provide functionality commonly needed in concurrent programs.

Eclipse has a parallel tools project (PTP), that is building an industry-strength platform that provides a highly integrated environment specifically designed for parallel application development. Version 1.1.1 is available as of September 6, 2007. The PTP v1.1.1 release notes are available and mention that this release includes a PTP Runtime perspective (including an abstract parallel machine view, jobs view and parallel launch configuration), PTP Debug perspective (including Parallel Debug view and scalable debug manager), and Parallel Language Development Tools.

Functional programming languages like Standard ML (SML), Objective Caml (OCAML), Erlang, Scala, and Haskell, can fit nicely with concurrent programming as functions don’t interfere with each other unless you do specific things to break the compatibility.

What more is needed beyond language extensions and libraries to take advantage of today’s modern, pervasive concurrent architectures? First, we need to rethink our use of mostly sequential programming primitives, paradigms, and practices. Testing of scalable multi-processor software systems could be done using multiple virtual machine technologies from companies like VMWare and tooling like that provided in the Eclipse PTP project.  New languages and new extensions to existing languages and libraries will also help us take advantage of concurrent programming for every programmer.

Gold User, Rank: 1, Points: 2466
David Intersimone (known to many as David I.) is a passionate and innovative software industry veteran-often referred to as a developer icon-who extols and educates the world on Embarcadero developer tools. He shares his visions as an active member of the industry speaking circuit and is tapped as an expert source by the media. He is a long-standing champion of architects, developers and database professionals and works to ensure that their needs are folded into Embarcadero's strategic product plans. David holds a bachelor's degree in computer science from California Polytechnic State University at San Luis Obispo, California.


  • Guest
    Moz Wednesday, 26 September 2007

    Very cool, thanks for the pile of links. Threaded code is mildly tricky in Delphi right now, so improvements would be very useful.

    One question: isn't VMWare currently limited to making VMs with at most equal to the physical CPU count? It would be incredibly handy to have VMs with more, as right now I test locally (1 or 2 cores) then on a remote server with lots'o'cores (and multiple physical CPUs). Doing the latter locally would be handy.

    What's with the strange mouse-over highlighting in your blog?

  • Guest
    Thomas Mueller Wednesday, 26 September 2007

    ... meanwhile in Germany a lone programmer is writing multithreaded applications and just hates it when the Delphi 2007 debugger freezes on him in the middle of a debugging session ...

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: