Computer scientists at Columbia Engineering say they’ve developed a system that makes multithreaded programs run more stably and efficiently.
Multithreaded programs power nearly all software applications and web services – and are prone to crashes, bugs and other problems. They’re difficult for programmers to get right, and often contain elusive bugs called races -like the one that set off the 2003 power blackout in the Northeast.
he columbia team says its Peregrine software system can be used by vendors to improve the reliability and security of multithreaded programs.
“Multithreaded programs are becoming more and more critical and pervasive. But these programs are nondeterministic, so running them is like tossing a coin or rolling dice — sometimes we get correct results, and sometimes we get wrong results or the program crashes,” says assistant professor of Computer Science Junfeng Yang.
“Our main finding in developing Peregrine is that we can make threads deterministic in an efficient and stable way.”
Peregrine, he says, can compute a plan for allowing when and where a thread can ‘change lanes’ and then place barriers between the lanes, allowing threads to change lanes only at fixed locations, following a fixed order.
This prevents themrandom collisions that can occur in a nondeterministic system, he says.
Once Peregrine has come up with a good plan without collisions for one group of threads, it can reuse the plan on subsequent groups.
Peregrine also deals with data races or bugs, unlike most previous systems, and is faster, says the team.
“Today’s software systems are large, complex, and plagued with errors, some of which have caused critical system failures and exploits,” says Yang.
“I’m excited about this area because it has the potential to make the cyberspace a better place and benefit every government, business, and individual who uses computers.”