Developer's Guide to Intel® Atom™ Processor, Part 2: Evaluating x86 Applications as Candidates for Intel® Atom™ Microarchitecture Optimization

Last Modified On :   April 29, 2009 7:13 PM PDT
Rate
 


By Nancy Nicolaison

Introduction: Choosing Legacy Code for Rapid, Successful Porting to Mobile Devices


In my last article, I reviewed the extensive opportunities to develop great applications for use on MID class devices, and specifically such devices powered by the Intel® Atom™ processor. In this article, I’ll take a closer look at what you need to consider when deciding to port existing x86 applications to an Intel® Atom™ microarchitecture.

Surveying the press, technical commentary and vendor positioning for MID class devices, it’s fair to say that no one has accurately or completely defined the space they potentially occupy, either in the technical sense or from the consumer perspective. Even so, given the current state of the world economy, the demand for these devices is astonishingly durable, largely because of their affordability as mobile connectivity solutions.  This poses something of a dilemma for developers.  While MID class devices offer an obvious opportunity for innovation, it is difficult to make a platform targeting choice in an immature market space. There are, however, a number of basic questions you need to ask when deciding on what legacy code you should port to an Intel® Atom™ processor-powered device.

Here are some key questions you should consider when deciding which legacy apps make the best porting candidates:


#1: Is there something likely to become a standard in your application’s use case scenarios?


An old bit of wisdom tells us that a rising tide lifts all boats.  In the technology business, standards have always been this tide.  And while a standards process is typically collaborative, the basis of a standard always arises when a single, key player comes forward with an evolutionary vision and can back it up with financial resources and market share.  At the end of the day, when it comes to standards, numbers matter, branding matters, and foresight matters.  The Intel® Atom™ processor and the Intel® x86 legacy code base have all three:

  • Virtually every significant user facing desktop or notebook app in existence enjoys an x86 legacy code base
  • The equities of skill and knowledge in the x86 targeting developer community is deep, broad and durable, and the ubiquity of Intel® Atom™ microarchitecture implementations across vendors and form factors creates depth and breadth of market for entrepreneurial MID developers.
  • In terms of battery life, the Intel® Atom™ processor turns in superlative performance, which could enable entirely new connected and mobile lifestyles for consumers.

 

#2:  Which business processes and use cases in the existing x86 code base offer the best porting candidates for rapid Intel® Atom™ processor class device exploitation?


From a solution designer’s point of view, the mobile device based on the Intel® Atom™ processor serves as the entry point to an architecture, for participation in the connected mobile work style, and a highly flexible personal tool for extending the reach of existing business processes.

In the context of the solution you have in mind, what does “mobile” mean? For example, if “mobile” means “connected”, then you need to consider what a MID can do beyond what a phone does. But if “mobile” means ultra-portable access to big computing iron and heavy lifting client/server functionality, you need to consider why notebook or netbook portability isn’t sufficient. You need to decide what it is that the MID class device will do that the phone does not do.


#3: What is the protocol for evaluating the porting potential of existing x86 code base assets?


In the world of low power devices, the Intel® Atom™ processor occupies the enviable position of being “heir apparent” to the world’s largest code base, the x86 legacy.  This means that enterprise and institutional IT strategists looking to extend the reach and flexibility of existing business process tools and support plenty of reasons to target the Intel® Atom™ processor and the powerful, inexpensive, highly mobile devices it enables.  To wit:

  • Existing client components of client server apps will, in many cases, port seamlessly to architectures where MIDs or Netbooks serve as the user facing platform.
  • Both Linux* and XP* MID and Netbook apps will enjoy a mature, robust, fully integrated security model from day one, making them targets of choice for mobilizing apps.
  • Extensive reuse of existing code, interface design and security models means accelerated development cycles, reduced testing costs and rapid deployments for apps mobilized using devices powered by the Intel® Atom™ processor.
  • Ported x86 legacy apps are the safest, most predictable, most fiscally conservative path for mobilizing user-facing elements of existing client server systems.

Ironically, these pragmatic motivations are also why mobilizing existing solutions is demanding of discernment and discipline on the part of pioneering MID architects.  Approaching mobile devices powered by the Intel® Atom™ processor like tiny notebooks or really big smart phones misses the unique and inherent opportunity in this new device class, and will definitely miss the usability mark.

Begin with a clear eyed, realistic evaluation of existing assets, time lines, budgets, and goals.  From a technical perspective, you need to be able to answer the next three questions with a high degree of confidence in order to choose porting candidates that will perform well on the devices, stay on schedule, and produce early financial returns:



#4: How easily can you optimize the user facing parts of the application for a mobile device?


  • Mobile interfaces must be simple and navigation hierarchies must be much flatter than they are on the desktop. Clear, unambiguous mobile device application flow relies largely on arrow keys, scrolling and the enter key for choice making.  This is much slower and potentially more frustrating for users than using the mouse or keyboard for input.
  • Any item that requires user selection should supply a default choice. Item selection defines mobile application flow, and automating it makes an application more convenient for the user by saving time.  User tolerance of delay is far less elastic on mobile devices than it is on the desktop, because mobile users typically have to give the device their undivided attention.
  • Mobile applications demand context sensitive help. If navigation is simplified and user interfaces are clear and intuitive, users may be able to experiment and find their way through difficulties they encounter.  However, counting on this rosy outcome is a mistake.  The best mobile application implements context sensitive user support.

 

#5: Can the porting candidate function effectively and respect small device constraints?

  • Screen back lighting:In terms of power management, one of the costliest operations on a mobile device is the use of high contrast screen lighting.  For this reason, determining the environments in which a mobile application will be used is a key consideration. Variations in ambient lighting have a dramatic effect on the usability of mobile applications.   For more on application-level power optimization, read the Energy Efficient Software article.
  • Minimal reliance on text: The screen real estate on a mobile device is limited, and for reasons of power management and memory management, use of native fonts is an established best practice for small, battery powered devices.  On the one hand, this means the font is well optimized for a given device; but on the other hand, it may not meet the needs of your application particularly well or be flexible enough for you to manipulate it in ways that compensate for any functional shortcomings.  For more on screen considerations, read the Best-Known Methods of UI design for MID article.
  • Memory Management: There are two reasons memory management is important to a mobile app.  First, and pretty obviously, there is a limited amount of memory available on a mobile device, which means that apps should be designed to be good “memory management citizens” and to defend themselves if other applications aren’t.  Applications must be conservative in allocation strategies, relinquish memory as soon as it is no longer needed, and fail gracefully if allocation requests can’t be fulfilled.  Second, anything stored by an app in local memory consumes power. Lower memory utilization typically reduces the power demand of the application, but there is no power management strategy that can be applied naively and consistently achieve optimal results.  For more on memory management, read the Keeping Memory in Mind article.
  • User Interface Review: Application must be evaluated for adaption to the smaller screen.  Often a redesign of the UI is necessary to adapt the application to the MID Device.  This is a key area for innovation: New designs might make better use of the MID platform rather than attempting to force an existing application to “fit”.  For more on UI considerations, read the Best-Known Methods of UI design for MID article.
#6: Does your x86 legacy code implement separation of concerns, so that user facing elements can be cleanly detached from business process logic and backend infrastructure?


In a best case scenario, well designed x86 legacy code could port extremely rapidly to a device with an Intel® Atom™ processor if it rigorously observes separation of concerns.  Being able to completely separate the presentation layer from business logic and server side infrastructure reliance translates to a dramatic reduction in recoding and testing costs, but developers will still need to take a new reality into account: Applications must be designed to handle a disconnected state gracefully, whether or not the disconnection was initiated intentionally by user or application.



#7: Ultimately, it all comes down to power management


Application state management: Certain behaviors that work well on the desktop are anathema to battery-powered devices.  In general, any behavior that keeps the processor from idling is prohibitively power-expensive.  Polling a server is a good example of this perverse behavior:  The device has to keep track of a timer, sends streams of queries which usually provide nothing useful in response, and has to maintain the overhead of a constant connection.  For most devices with an Intel® Atom™ processor, connected battery life is about half that of unconnected battery life.  “Spinning” the processor also incurs dramatic reductions in battery life.  If dynamic update is required, it is much more power efficient to set the process up as a “push” from the server end.

Conservative use of device resources: Along with powering the antenna and the processor, drawing the display is the big battery power consumer.  Screen brightness is the most obvious consideration here, but there are a few other operations that can be optimized to great effect.

  • Optimize application images: There are several open source utilities available for this job, and it can have a very positive impact on image load times and application power performance.  Pngcrush  http://pmt.sourceforge.net/pngcrush/ is an MSDOS, UNIX* or LINUX* command line utility that compresses PNG files using a variety of lossy filter methods, or optionally completely removes unwanted PNG file chunks.
  • Use optimized vector graphics where possible: Bitmapped graphics may not produce aesthetically pleasing images when simplified and optimized to the extent necessary for very small screens.  Also, while it’s true you may download them once and cache them, they can tremendously expand the amount of local storage you have to support.  Optimized vector graphics must be redrawn every time they display, but if simplified, they result in more “readable” image display for users and less local storage overhead.
  • Unroll loops if they are deterministic: Loop unrolling reduces the number of instructions in a given passage of object code by up to one half. Most optimizing compilers have a switch you can set to achieve this result transparently.  While loop unrolling produces larger code, it reduces the processor utilization significantly. As of the time of this paper, the Intel® Compiler is the most effective optimizing compiler for the Intel® Atom™ processor and provides this efficiency transparently.
  • Use integer math instead of floating point math: When evaluating code for porting, analyze all numeric data structures to see where you can eliminate the use of floating point data.  Integers require far less storage and incur much less processing overhead.

Summary:


Rapid, successful, cost controlled application implementation on mobile devices with Intel® Atom™ processors are chiefly a matter of carefully selecting existing x86 applications to port.  The best candidates will have most of these features:

  • Original code implements separation of concerns
  • Not highly dependent on detailed graphics
  • Can accept asynchronous data updates
  • Full time connectivity is not required.  For example, the application may implement compensating strategies like local data caching when offline and/or batch uploads and downloads.
  • Provide a satisfying user experience given a very flat, simple navigation hierarchy
  • Predictable use cases for ambient lighting, user patterns of interaction, and session durations

Link to other parts of this series:

Part 1: A New Class of Internet Devices
Part 3: Choosing Optimization Candidates
Part 4: Hands-On Debugging Guide



About the Author

Nancy Nicolaisen is an author, researcher and veteran software developer specializing in mobile and embedded device technologies. Her feature articles, columns and analyses have been internationally circulated in publications including BYTE, PC Magazine, Windows Sources, Computer Shopper, Dr. Dobbs Journal of Software Engineering, Microsoft Systems Journal; She is author of three books: Making Windows Portable: Porting Win32 to Win CE (2002, John Wiley & Sons); The Practical Guide to Debugging 32 Bit Windows Applications (1996, McGraw Hill); and The Visual Guide to Visual C++ (1994, Ventana Press) available in five foreign language editions. In 2007 she served as technical advisor for the development of the Microsoft Professional Education course titled "Designing, Building and Managing Wireless Networks". Ms. Nicolaisen is currently active in exploring open source technologies and trends for mobile, embedded and wireless devices. In terms of power management, one of the costliest operations on a mobile device is the use of high contrast screen lighting.  For this reason, determining the environments in which a mobile application will be used is a key consideration. Variations in ambient lighting have a dramatic effect on the usability of mobile applications.   For more on application-level power optimization, read Energy Efficient Software.