Lee suggests that we design programming languages with threading in mind. That’s definitely the right approach. Threading needs to be treated in a first-class manner and integrated into the language design so the opportunities for threads to interact are limited. (It’s the 7000 times 7000 as opposed to 7000 plus 7000 that kills us. So if we limit the contact points between threads, we can make a huge difference in the manageability of the code.)
Do we need entirely new languages? Lee suggests a new category of languages that would be used just for coordination in conjunction with existing languages. But this approach will be difficult, given the difficulties of dealing with the semantics of languages not designed for concurrency.
In fact, there are programming languages that have been around for a while that address this issue. In particular, all three generations of Ada—Ada-83, Ada-95, and the just approved Ada-2005 standard—regard tasks (its word for threads) as first-class citizens. It’s no surprise that critical applications in air-traffic control, radar, and avionics make significant use of Ada. For example, iFACTs, the next-generation air-traffic control system for Great Britain, is being written entirely in Ada.
Before we go off and reinvent the wheel, we should check what we have on the shelf. Lee mentions Ada (and some other similar languages), but dismisses them on the grounds that they aren’t likely to become mainstream. Perhaps the widespread appearance of multicore processors should lead us to revise what should be in the mainstream.
Reference
1. Edward Lee, “The Problem With Threads,”
www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf .
Dr. Robert Dewar is cofounder, president, and CEO of AdaCore. He also has had a distinguished career as Professor of Computer Science (emeritus) at the Courant Institute of New York University. He has been involved with the Ada programming language since its inception in the early 1980s and, as co-director of both the Ada-Ed and the GNAT projects, he led the NYU team that developed the first validated Ada compiler. Dr. Dewar was one of the authors of the requirements document for the Ada 95 revision, and he served as a distinguished reviewer for both Ada 83 and Ada 95. He has co-authored compilers for SPITBOL (SNOBOL), Realia COBOL for the PC (now marketed by Computer Associates), and Alsys Ada, and he is a principal architect of AdaCore’s GNAT Ada technology. He has also written several real-time operating systems for Honeywell Inc.