Researchers squash battery-draining bugs
PluzMedia.com reports.
"These energy bugs are a silent battery killer," said Y Charlie Hu, Purdue University professor of electrical and computer engineering. "A fully charged phone battery can be drained in as little as five hours."
News Track India writes that since conserving battery power is critical for smartphones, the industry has adopted "an aggressive sleep policy".
"What this means is that smartphones are always in a sleep mode, by default. When there are no active user interactions such as screen touches, every component, including the central processor, stays off unless an app instructs the operating system to keep it on," Hu said.
To prevent the phone from going to sleep during such operations, smartphone manufacturers make application programming interfaces, or APIs, available to app developers, Science Daily notes.
The developers insert the APIs into apps to instruct the phone to stay awake long enough to perform necessary operations.
"App developers have to explicitly juggle different power control APIs that are exported from the operating systems of the smartphones," Hu said. "Unfortunately, programmers are only human. They make mistakes when using these APIs, which leads to software bugs that mishandle power control, preventing the phone from engaging the sleep mode. As a result, the phone stays awake and drains the battery."
The researchers have completed the first systematic study of the no-sleep bugs and have proposed a method for automatically detecting them.
To detect bugs in applications, the researchers modified a tool called a compiler, which translates code written in computer languages into the binary code that computers understand. The tool adds new functionality to the compiler so that it can determine where no-sleep bugs might exist.
The Purdue researchers have coined the term "power-encumbered programming" to describe the smartphone energy bugs. Researchers concentrated on the Android smartphone, but the same types of bugs appear to affect other brands, Hu said.
Share