
By Tom R. Halfhill![]()
Engineers have their own version of the expression “passing the buck.” In the cube-farm offices of Silicon Valley, it’s called “throwing the problem over the wall.” That’s what hardware engineers are doing with multi-core processors.
After running out of new ways to make processors faster, they are slapping down multiple processor cores on a single chip and daring the software engineers to program the damn things.
Writing software code that runs efficiently in parallel on multiple processors or multiple cores looks hard, and often it’s even harder than it looks. One problem is that many general-purpose applications don’t easily break down into multiple tasks.
For instance, a word processor can use one CPU to read keystrokes and display what you type, but unless you happen to be printing another document simultaneously, there’s not much else for a second (or third, or fourth...) processor to do. In fact, the first CPU spends so much time waiting between your keystrokes that it can print something as a background task without breaking a sweat.
Games offer more opportunities for parallelism. However, today’s graphics processors already offload most heavy lifting from the CPU. They do the math for plotting 3D vertices, texture mapping, shading, and so forth. At a recent engineering conference, nVidia chief scientist David Kirk said that multi-core CPUs sometimes can’t keep up with his graphics processors. Worse, he’s seen some games run slower on multi-core CPUs, because the programmers didn’t understand how multiple cores interact with the caches.
Operating systems must get smarter, too. Ideally, they should be able to distribute workloads across multiple processors or cores, even if the individual programs contain little or no parallel code. Modern PCs always have several programs running or idling in the background. (To view the list, press Ctrl-Alt-Del and click the Task Manager’s Processes tab.)
Unfortunately, load balancing isn’t easy. It will be years before operating systems catch up with the multi-core trend. Maybe it’s karma. For decades, hardware engineers designed faster microprocessors while too many software engineers got lazy and hid their sloppy programming behind the blessings of Moore’s law. Now the programmers aren’t getting a free ride any more.
Links:
[1] http://www.maximumpc.com/articles/magazine/2005
[2] http://www.maximumpc.com/articles/magazine/2005/november_2005
[3] http://www.maximumpc.com/articles/magazine
[4] http://www.maximumpc.com/user/login?&commentfragment=comments_top_anchor