Forum for Science, Industry and Business

Sponsored by:     3M 
Search our Site:

 

Parallel programming may not be so daunting

25.03.2014

'Lock-free' parallel algorithms may match performance of more complex 'wait-free' algorithms

Computer chips have stopped getting faster: The regular performance improvements we've come to expect are now the result of chipmakers' adding more cores, or processing units, to their chips, rather than increasing their clock speed.

In theory, doubling the number of cores doubles the chip's efficiency, but splitting up computations so that they run efficiently in parallel isn't easy. On the other hand, say a trio of computer scientists from MIT, Israel's Technion, and Microsoft Research, neither is it as hard as had been feared.

Commercial software developers writing programs for multicore chips frequently use so-called "lock-free" parallel algorithms, which are relatively easy to generate from standard sequential code. In fact, in many cases the conversion can be done automatically.

Yet lock-free algorithms don't come with very satisfying theoretical guarantees: All they promise is that at least one core will make progress on its computational task in a fixed span of time. But if they don't exceed that standard, they squander all the additional computational power that multiple cores provide.

In recent years, theoretical computer scientists have demonstrated ingenious alternatives called "wait-free" algorithms, which guarantee that all cores will make progress in a fixed span of time. But deriving them from sequential code is extremely complicated, and commercial developers have largely neglected them.

In a paper to be presented at the Association for Computing Machinery's Annual Symposium on the Theory of Computing in May, Nir Shavit, a professor in MIT's Department of Electrical Engineering and Computer Science; his former student Dan Alistarh, who's now at Microsoft Research; and Keren Censor-Hillel of the Technion demonstrate a new analytic technique suggesting that, in a wide range of real-world cases, lock-free algorithms actually give wait-free performance.

"In practice, programmers program as if everything is wait-free," Shavit says. "This is a kind of mystery. What we are exposing in the paper is this little-talked-about intuition that programmers have about how [chip] schedulers work, that they are actually benevolent."

The researchers' key insight was that the chip's performance as a whole could be characterized more simply than the performance of the individual cores. That's because the allocation of different "threads," or chunks of code executed in parallel, is symmetric. "It doesn't matter whether thread 1 is in state A and thread 2 is in state B or if you just swap the states around," says Alistarh, who contributed to the work while at MIT. "What we noticed is that by coalescing symmetric states, you can simplify this a lot."

In a real chip, the allocation of threads to cores is "a complex interplay of latencies and scheduling policies," Alistarh says. In practice, however, the decisions arrived at through that complex interplay end up looking a lot like randomness. So the researchers modeled the scheduling of threads as a process that has at least a little randomness in it: At any time, there's some probability that a new thread will be initiated on any given core.

The researchers found that even with a random scheduler, a wide range of lock-free algorithms offered performance guarantees that were as good as those offered by wait-free algorithms.

That analysis held, no matter how the probability of thread assignment varied from core to core. But the researchers also performed a more specific analysis, asking what would happen when multiple cores were trying to write data to the same location in memory and one of them kept getting there ahead of the others. That's the situation that results in a lock-free algorithm's worst performance, when only one core is making progress.

For that case, they considered a particular set of probabilities, in which every core had the same chance of being assigned a thread at any given time. "This is kind of a worst-case random scheduler," Alistarh says. Even then, however, the number of cores that made progress never dipped below the square root of the number of cores assigned threads, which is still better than the minimum performance guarantee of lock-free algorithms.

###

Additional background

Archive: "Multicore may not be so scary": http://web.mit.edu/newsoffice/2010/multicore-0930.html

Abby Abazorius | EurekAlert!

Further reports about: Computing Engineering MIT Technion Technology decisions individual processing programming randomness technique

More articles from Information Technology:

nachricht Magnetic fields provide a new way to communicate wirelessly
01.09.2015 | University of California - San Diego

nachricht 'Magic' sphere for information transfer
24.08.2015 | Lomonosov Moscow State University

All articles from Information Technology >>>

The most recent press releases about innovation >>>

Die letzten 5 Focus-News des innovations-reports im Überblick:

Im Focus: Hubble survey unlocks clues to star birth in neighboring galaxy

In a survey of NASA's Hubble Space Telescope images of 2,753 young, blue star clusters in the neighboring Andromeda galaxy (M31), astronomers have found that M31 and our own galaxy have a similar percentage of newborn stars based on mass.

By nailing down what percentage of stars have a particular mass within a cluster, or the Initial Mass Function (IMF), scientists can better interpret the light...

Im Focus: Fraunhofer ISE Develops Highly Compact Inverter for Uninterruptible Power Supplies

Silicon Carbide Components Enable Efficiency of 98.7 percent

Researchers at the Fraunhofer Institute for Solar Energy Systems ISE have developed a highly compact and efficient inverter for use in uninterruptible power...

Im Focus: How wind sculpted Earth's largest dust deposit

China's Loess Plateau was formed by wind alternately depositing dust or removing dust over the last 2.6 million years, according to a new report from University of Arizona geoscientists. The study is the first to explain how the steep-fronted plateau formed.

China's Loess Plateau was formed by wind alternately depositing dust or removing dust over the last 2.6 million years, according to a new report from...

Im Focus: An engineered surface unsticks sticky water droplets

The leaves of the lotus flower, and other natural surfaces that repel water and dirt, have been the model for many types of engineered liquid-repelling surfaces. As slippery as these surfaces are, however, tiny water droplets still stick to them. Now, Penn State researchers have developed nano/micro-textured, highly slippery surfaces able to outperform these naturally inspired coatings, particularly when the water is a vapor or tiny droplets.

Enhancing the mobility of liquid droplets on rough surfaces could improve condensation heat transfer for power-plant heat exchangers, create more efficient...

Im Focus: Increasingly severe disturbances weaken world's temperate forests

Longer, more severe, and hotter droughts and a myriad of other threats, including diseases and more extensive and severe wildfires, are threatening to transform some of the world's temperate forests, a new study published in Science has found. Without informed management, some forests could convert to shrublands or grasslands within the coming decades.

"While we have been trying to manage for resilience of 20th century conditions, we realize now that we must prepare for transformations and attempt to ease...

All Focus news of the innovation-report >>>

Anzeige

Anzeige

Event News

Together - Work - Experience

03.09.2015 | Event News

Networking conference in Heidelberg for outstanding mathematicians and computer scientists

20.08.2015 | Event News

Scientists meet in Münster for the world’s largest Chitin und Chitosan Conference

20.08.2015 | Event News

 
Latest News

Ion implanted, co-annealed, screen-printed 21% efficient n-PERT solar cells with a bifaciality >97%

04.09.2015 | Power and Electrical Engineering

Casting of SiSiC: new perspectives for chemical and plant engineering

04.09.2015 | Machine Engineering

Extremely thin ceramic components made possible by extrusion

04.09.2015 | Materials Sciences

VideoLinks
B2B-VideoLinks
More VideoLinks >>>