A Different Approach to Multi-core Programming January 8, 2010Posted by Peter Varhol in Software development, Software tools.
One of my favorite topics for investigation is multi-core programming. As a computer user, I have two dual-core Intel processor systems on my work table. Yet for the vast majority of applications available today, this kind of computing power cannot be used to execute in parallel.
As a developer, I know just how difficult this is. One of the most difficult problems we face is understanding the application intimately to know where there are opportunities for separate code streams to run independently, and to make detailed changes to the code in those areas to make sure the code will run on different cores without causing synchronization problems. I’ve talked about the issues involved in more detail in this post.
Mitrionics Chief Science Officer Stefan Möhl recently told me that the inability to fully utilize more than a single core has dire implications to our information society. “Our computing practices are built upon the foundation provided by Moore’s Law. If Moore’s Law no longer holds, because software can’t take advantage of increased computing power, our information society will no longer be able to advance at the rate of the past.”
I look at that statement as a bit of hyperbole, yet there’s no denying that with multiple cores processors have theoretically improved performance, we haven’t seen it in practical use. Unless we do, we are losing out on a great deal of computing power.
Mitrionics AB has a piece of the answer to the parallel processing puzzle. While it doesn’t by itself parallelize code, its Mitrion-C provides a language that enables developers to easily parallelize code, and to port that code to other processors. Mitrion-C is not an ANSI C, but rather a completely new language optimized for parallel compilation and execution. Möhl says it uses C syntax, but is probably as different from C as is the Java language. Mitrion-C was originally developed to run on processors that were encoded into Field-Programmable Gate Arrays (FPGAs), electronic devices from the likes of Xilinx and Altera that could have custom functions encoded in them.
More recently, Mitrionics has branched off to work on getting Mitrion-C to compile and run parallel code on other types of processors and systems. At Supercomputing ’09 in November, the company announced a proof-of-concept compiler to be able to demonstrate that a Mitrion-C program will automatically scale through parallel execution without changing the source code between theses very diverse architectures. In particular, the company has tested Mitrion-C with multi-core systems and clusters, and have determined that no code changes are needed in order to achieve parallel operation.
It remains to be seen how we will approach multi-core and multi-processor programming to get better performance than we are able to today. This approach looks intriguing, but I’m not sure it will gain widespread acceptance, at least not without a better understanding of what it does. I’ve also been looking at Intel’s Parallel Studio, which is a more traditional way of looking at parallel programming, and may have something more to say on that in the near future.