Due to limitations imposed by transistor physics as device geometries continue to get finer and finer, the time when each new generation of processors was clocked faster than its predecessors is largely over. Nevertheless, as individual processor cores get smaller, chip manufacturers have turned instead to cramming a large number of cores onto a single die. Consequently, nearly all commercially available CPUs (central processing units), even those used in smartphones, already depend upon a multicore architecture. Unfortunately, the programming languages used for nearly all commercial software projects are really intended for generating code for a single CPU core. Though extensions exist that support multiple cores, it is something that is essentially tacked on, not part of the core language's constructs.

Tubes is a standards-compliant C header library that extends the C language to include parallel dataflow constructs. The Tubes concept is essentially a generalization of the signals-and-slots metaphor, as made popular by the Qt graphical user interface library, extended to include most of the more common forms of parallelism. Tubes has the potential to make concurrent code easier to write, smaller, less bug-prone, and easier to debug.

The creation of Tubes was specifically motivated by a wish to move the IKOS static analyzer toward a multicore architecture. Previous experience of doing this on an earlier static analyzer, CGS, revealed that the conventional approach led to considerable difficulty. CGS was implemented in C, so parallelizing the code was quite difficult, resulting in a lot of overhead that made the code much harder to maintain and debug. IKOS is implemented in C, using modern template meta-programming techniques, and as such is currently a very clean design that is easy to maintain and extend.

As open source, Tubes would likely have significant impact, both as a natural successor to the already well known sigslot library, and as a potential new and easier way to implement parallel, multithreaded software.

This work was done by Sarah Thompson for Ames Research Center. NASA is seeking partners to further develop this technology through joint cooperative research and development. For more information about this technology and to explore opportunities, please contact David Morse at This email address is being protected from spambots. You need JavaScript enabled to view it. or 650-604-4724. ARC-16975-1


NASA Tech Briefs Magazine

This article first appeared in the February, 2017 issue of NASA Tech Briefs Magazine.

Read more articles from this issue here.

Read more articles from the archives here.