Programming Multi-Core Processors –Virtual Instrumentation offers Solutions
For those who don’t know what multicore processing is, Wikipedia has a nice description here. Multi-core processors bring performance benefits with new entrants such as IBM/Sony’s Cell processor which I posted about last year here.
The key to multi-core programming is managing multiple threads to maximize the performance of the cores. While this may sound simple, actual implementation is more difficult.
Intel offers tools for multi-core processing. Sun, Microsoft, and Red Hat Linux offer upgraded operating systems specifically designed to support multi-core operations but the challenges in programming multi-cores remain.
Since languages such as C don’t fit well into the world of multi-core processing. Codeplay offers specialized versions of C which can help a user parallelize a C program. The key to writing good multi-core programming is getting the timing right.
Another challenge arises when one considers there are symmetric multi-cores and asymmetric multi-cores. In symmetric applications, one instantiation of the operating system can provide resources to each core. In asymmetric multi-cores, each core could have a separate instantiation requiring separate resources.
Virtual Instrumentation, in particular LabVIEW brings a number of benefits to multi-core programming. LabVIEW provides programming resources for multithreading applications. This whitepaper gives more details. In perusing the LAVA forum there are a number of entries related to multi-core programming. Here’s one entry which shows how to use LabVIEW on a dual core PC and take advantage of both cores. You simply setup two loops and point one at each core. LabVIEW uses multiple OS threads to distribute the work among the two cores. Another one is TenAsys who implemented a LabVIEW application on a dual core system by placing the OS tasks in one core and the interfacing in another to improve real-time performance.
Next week is NI Week 2006 in Austin where Dean Kamen will give the keynote speech. I look forward to meeting with many from virtual instrumentation community there.