Taming the Multicore Beast

By Jakob Engblom

“The results of the survey demonstrate that engineers want to move to new multicore architectures, but ...”


Recent media attention has focused on the creation of three industry-supported university labs in the U.S. These labs are dedicated to improving software development for multicore chips. They are located at the universities of Stanford, Berkeley, and Urbana-Champaign and funded by computing industry leaders AMD, HP, IBM, Intel, Microsoft, Nvidia, and Sun. By leveraging the BEE3 field-programmable-gate-array (FPGA) - based system simulators, the three research groups plan to provide a testing ground for designing and programming systems with a potentially very large number of cores. The research looks into both programming models and hardware support, such as transactional memory. Fundamentally, the question being addressed is how the combined hardware-software system can better support the expression of parallel algorithms and programs. Eventually, this work will provide new technology that will be part of the processors that we all buy. It is research that should have been done many years ago.

In the here and now, however, the virtualized-software-development (VSD) and virtual-platform industry is already offering market-ready development platforms with multicore capabilities. These tools help programmers tackle the problems that currently face them as they migrate their existing code from single processors to multiprocessors and multicore devices. At the Embedded Systems Conference (ESC), Virtutech conducted a survey with embedded-multicore-chip provider Freescale Semiconductor. The companies’ goal was to gauge the interest and readiness of engineers to develop for multicore systems and adopt virtual platforms for their development work.

The results of the survey demonstrate that engineers want to move to new multicore architectures. But they are constrained by the fact that software innovation hasn’t kept pace with the multicore hardware on which it’s designed to run. As a result, the computing world isn’t realizing the potential advantages of multicore processors and SoCs. After all, software cannot keep up and tends to get stuck in debugging parallel software. This issue is especially acute for many users of embedded x86 processors, as the x86 world has turned completely to multicore to provide increased performance.

Virtualized software development can solve this problem by providing the development tools and pre-existing hardware models that simplify and accelerate complex software development. Two particular problems solved by virtual platforms are repeatability and probe effects. On a physical parallel computer, every run of a parallel program will be different, as the timing of interactions between cores varies. This means that timing-related bugs, such as race conditions, will show up every once in a while. In addition, repeating them is very hard.

In the world of virtualized software development, repeatability is ensured by the virtualization system controlling the virtual time and recording all inputs. Once a bug has manifested itself inside the virtual world, it can be trivially reproduced—over and over again. Designers also can use reverse execution to back out of a bug and investigate the system state that leads up to the problem. This is impossible physical hardware as well as a great boon to parallel software debugging.

Virtualized software development also is free from probe effects, as instrumentation is added inside the virtualization layer without disturbing the timing or behavior of the software running on the virtual hardware. This removes the “Heisenbug” effect (in which the act of trying to observe a bug makes it go away due to the disturbance you introduce). In doing so, it makes the debug of parallel software a much more palatable task.

Apart from the host-target side, a new version of the Simics development platform enables software developers to leverage the multicore architecture of their host environment to run very large virtual-hardware setups containing many tens of boards and networked machines on a single workstation. One can see how multicore enables new levels of performance once that software is parallelized.

Jakob Engblom is technical marketing manager at Virtutech in Stockholm, Sweden. He holds an MSc in computer science and a PhD in computer systems from Uppsala University. Engblom is interested in parallel computer architectures, simulation technology, and embedded-software development.