Decision time? Check out our latest product comparisons

Software nudges frozen computers out of infinite loops

By

August 3, 2011

A new software tool has been developed, for getting frozen computers out of infinite loops...

A new software tool has been developed, for getting frozen computers out of infinite loops caused by program errors (Image: Christine Daniloff)

There are few things as maddening as being in the middle of a task on a computer, and having the software freeze up on you. This can be particularly enraging if you haven't backed up your work recently, and you know that the only way of "thawing out" the program will be to execute a force quit - your work will be lost, all because the (insert word of your choice here) computer didn't know what to do next. Fortunately, however, researchers from MIT's Computer Science and Artificial Intelligence Laboratory have developed a tool that jolts stalled programs back into action.

Programs commonly contain thousands of loops, that allow the computer to perform the same task over and over, such as systematically comparing each letter in a document to those in a search term. Should there be a slight error in the code, however, the computer can get stuck in an infinite loop, performing the exact same function indefinitely - it could keep comparing the same letter, for instance, instead of moving on to the next one.

In order to get computers out of infinite loops, MIT computer science professor Martin Rinard and his graduate students Michael Carbin, Sasa Misailovic and Michael Kling have created a software tool that is appropriately named Jolt. When activated by a user who thinks their computer might have frozen up, Jolt takes a series of "snapshots" of the computer's memory after each run of a loop. If all of those snapshots are identical, then the machine is indeed stuck in an infinite loop.

Jolt then instructs the computer to move on to the next instruction within the program. In order to be able to do that, however, Jolt must first be aware of the beginning and end points of all the loops within the program's source code. This requires it to also be used by software developers, when their complex programming language is being compiled into computer-friendly binary.

Getting developers to use Jolt could be asking a lot, however, plus it causes programs to run 7 to 8 percent slower. To get around these limitations, Rinard and his team are now working on a binary edition of the software, called Bolt. It is able to work directly on compiled, binary versions of programs. One of the challenges in the development of Bolt is the identification of the beginning and end points of loops in binary code - whereas such points are relatively easy to spot in programming language, they can difficult to locate within the strings of numbers that make up binary.

Kling has addressed this problem by developing an algorithm that allows Bolt to identify the highest-level function that is running in a program at any one time. If that still doesn't provide enough information, then Bolt could conceivably even just start searching for new instructions at random, until it finds one that allows the program to move on. Although going to that next instruction might not be the perfect choice for the smooth running of the program, it would at least get the computer out of the loop, so that the user's work could be saved.

The MIT team presented Jolt at the 25th European Conference on Object-Oriented Programming in Lancaster, England, last month.

About the Author
Ben Coxworth An experienced freelance writer, videographer and television producer, Ben's interest in all forms of innovation is particularly fanatical when it comes to human-powered transportation, film-making gear, environmentally-friendly technologies and anything that's designed to go underwater. He lives in Edmonton, Alberta, where he spends a lot of time going over the handlebars of his mountain bike, hanging out in off-leash parks, and wishing the Pacific Ocean wasn't so far away.   All articles by Ben Coxworth
Tags
6 Comments

That's pretty bad ass. I write software, and I know how easy it is to get a loop stuck!

Daryl Sonnier
3rd August, 2011 @ 09:29 pm PDT

It seems that a version that could send developer feedback would be a good thing too.

Charles Bosse
4th August, 2011 @ 10:49 am PDT

But if your PC or Mac is totally locked up, you can't run Jolt or Bolt or anything else to smack it upside the head and get it working again. :P

An app I'd like to see for Mac and Windows is a program killer that will force a program to quit RIGHT EFFING NOW. Not whenever the manager gets around to killing the stuck app, NOW, not later.

BeOS had that. You wanted an app stopped, it stopped it.

Gregg Eshelman
4th August, 2011 @ 04:07 pm PDT

@Gregg Eshelman

True, but it seems on modern operating systems, a single program is much more likely to freeze than the whole OS.

And the Force Quit function in OS X works right now almost all of the time.

Alex Dlugosch
4th August, 2011 @ 06:40 pm PDT

Gregg, this seems to be aimed at developers. I don't think it was designed to prevent apps from locking up your machine. BTW-- I'm not the Mike Kling that wrote Jolt. Just another guy with the same name.

Mike Kling
5th August, 2011 @ 11:38 am PDT

What we are talking here is a program to stop the loop, not kill one program running on any particular OS and it does look like it's aimed at users, not developers. It's ability to run and do it's job will depend somewhat on the amount of free memory as well. It sounds like a "work-a-round" for a program that is not fully debugged! LINUX has a kill function for killing any misbehaving programs as well as a monitor program to show what all is running. This monitor program will let you kill any program as well

Will, the tink
8th August, 2011 @ 05:30 am PDT
Post a Comment

Login with your gizmag account:

Or Login with Facebook:


Related Articles
Looking for something? Search our 28,998 articles