The Desktop Traffic Jam

Multicore chips are a boon for desktop processing speed, but software can't always keep up. Here's why.

1 2 3 4 Page 3
Page 3 of 4

Rob Enderle, analyst at Enderle Group in San Jose, says Windows 7 does an even better job of it. "Windows 7 is designed to use as many cores as the machine has and will partition an application among the multiple cores -- but that does not give as much benefit as if the application used the cores directly."

Windows 7 has an alternative mechanism called User Mode Scheduling (UMS), which lets thread multiplexing onto cores take place within the application itself instead of in the kernel. Multiplexing of threads is the process of deciding which thread is executed next. Handling this multiplexing within the application instead of in the operating system kernel "makes thread scheduling more efficient," Smith says.

A Microsoft blog post indicates that programmer access to UMS is possible through Visual Studio 2010, currently in beta, and involves using the operating system's Concurrency Runtime framework. Windows 7 will also be able to use 256 cores, arranged into four groups of 64.

Meanwhile, most applications will run on only one core, "so you get the benefit of having multiple cores only when running multiple applications," Enderle says. Virus checkers and utilities that run in the background "tend to not visibly drag down your machine, whereas on a single-core processor they definitely do," he says. Two cores seem to be optimum, and a third "gives you headroom." When watching the performance meter in Windows, "you can light up two cores really easily, three occasionally and four hardly ever. Four cores are for video games, heavily threaded applications or DNA analysis."

There is no easy way to program in parallel; it's like writing poetry in Klingon."

Turley says that the world doesn't need yet another programming language. "Any third-year student worth his salt has invented one, but the trouble is getting people to adopt it -- no one wants to learn a new language." If some authority would declare support for one approach, then people would rally around it, but in the meantime, there is widespread confusion and competing claims, he says. "We may have to wait for the current generation of programmers to die off and be replaced by programmers brought up on a new paradigm," Turley laments.

The easiest way to add parallelism is to call code that's already parallelized, from a library, says Adobe's Williams. The next easiest is to use bottleneck routines, or separate little routines that know only about specific pixels. "That is the way we did it for a long time," Williams says. A third way is to write a parallel version of a complicated algorithm. But "that can easily take twice as much work" as writing a nonparallel version.

A fourth approach is functional parallelism, "where you let the user do different things simultaneously, such as getting thumbnail images while changing meta-images," Williams explains. "Photoshop was written before system software supported that, so we don't do a lot of that. Modern operating system facilities let you do functional threading without a huge amount of effort -- maybe 50% more -- but converting a large algorithm written before such stuff was available is a big effort."

1 2 3 4 Page 3
Page 3 of 4
Shop Tech Products at Amazon