Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Monday, June 10, 2013

Let's teach battery perservation in Computer Science

In a society that is increasingly moving towards always-on mobile ubiquity, graduates of computer science degrees can be trained to write code that dramatically saves battery life. Mobile technology is affordable, and it is easy to teach about battery consumption when learning to code.

Apple's OSX Maverick unveiled at WWDC today unveiled a battery preservation technology that has been available in Windows for about 4 years. Timer Coalescing combines disparate background tasks onto the same clock cycle so that the CPU spends more time idling. As explained from Apple's whitepaper, it synchronizes thread processing to increase CPU idle time.

Before Timer Coalescing


After Timer Coalescing

While energy saving hardware has advanced significantly in recent years, software development techniques remain relatively unchanged. Clay Bershear's post on energy efficient programming talks about how programmers can save power with vector operations, limiting loop increment complexity, and simpler code. Power consumption simulators such as ENERJ will allow developers to understand how much power their software consumes during development. Companies are also documenting exactly how much power each operation consumes.
I was once told that a prominent GPU producer had measured the amount of energy that every operation (computation, access to memory, moving data in from off-card, etc.) took on its products.
I could see programming assignments for creating an algorithm that sorts 10K random items with less than 0.1W of power. Or an JPEG compressor that uses less than 0.5W per 15 megapixel bitmap.

I'd love to hear what ideas can you think of.