Reducing OS Boot Times for In-Car Computer Applications
A modern high-end car now comes equipped with a half dozen computers outside of the ones that run the engine. Vehicles now come with XM or Sirius radio, OnStar GPS and concierge, Network Car telemetry functions and built-in navigation systems from a number of vendors. The tops of vehicles now are adorned with sharkfin-shaped antennas for satellite audio, GPS and cellular networks. Although telemetry is the catch-all word for the new automobile-computer market, many in-car computer applications have little to do with remote measurement. Cars now may contain info-tainment related computers and MP3 players, such as the Phatnoise Audiokeg, and even may download those MP3s over Wi-Fi with Rockford Fosgate's Omnifi. And, let us not forget iPod and its mobile brethren, all of which spend much of their lives in the center console of a car, wired to its power and audio.
The problem with these computer-driven devices is, although they do one thing well, they aren't expandable and reprogrammable. Yet, besides the applications noted above, many people probably would wonder why they really need a general purpose computer in their cars. In many ways, the new devices for cars simply extend existing application models. For instance, XM and Sirius are more radio stations, and AudioKeg, Omnifi and MP3 players in general are large CD changers, which simply are much larger boxes of tapes.
The strength of a general purpose computer is it allows applications that haven't even been thought of yet to appear. In the early 1980s, people were receiving strong marketing messages that they needed a personal computer in their homes, but many didn't know why. To organize recipes? To keep a checkbook? But the emergence of killer applications continued until almost every household had a computer.
Killer application sounds like a very bad thing to use while driving a car, but the fact remains that many new applications no one has thought of yet will be possible to use with a general purpose platform. A single purpose Wi-Fi enabled audio jukebox can download MP3s and audio books--but can it get your e-mail and read it to you while you're on the road? Can it download all your blogs and read those to you? Can it share audio with other drivers on the road? Can it keep a full GPS log of your travels and allow you to annotate them as you go? Can it wake up and record your favorite public radio show over the weekend and have the other morning show ready for you on your commute home, à lá TiVo for radio? All these applications and more become possible with an open programmable platform.
Car stereos have been running Linux for years. The question now is how to get such a general-purpose platform into the mainstream and get developers working on new applications for it.
Although we've discussed our motivation for wanting general purpose computers in cars, it should be obvious that existing computers are unsuitable for the task. The major engineering challenges for getting existing computers into the car are heat, power, vibration and boot times.
Many of the above problems have been solved by some innovative vendors who have been working on these problems for the consumer and do-it-yourself system builder market. The embedded systems industry has been making shakable, bakeable, low-power, fast booting devices for years, but a popular mini-ITX form factor has been developed and adopted by a number of systems manufacturers, notably VIA Technologies, with their cheap, feature-packed, small and x86-compatible motherboards. These low power boards have CPUs that can run passively cooled (fanless) and boards designed for high heat environments. This, combined with the direct DC to DC power converters that provide ATX-like power directly from 12V batteries, have helped a large and growing community of car PC hobbyists get PCs into their cars. Laptop drives, rubber shock-mounting and ruggedized cases have all but solved the vibration problems. But with standard PC BIOSes doing everything from hard drive autodetection to plug and play, and then standard OSes taking from 30 seconds to a minute to start up, boot time remains a barrier for a car-ready computer.
Cold-booting the OS is one of the few options available to a car PC. Although many low power modes exist for desktops, these can draw as much as 100mA of current for such features as USB and Wake-on-LAN. Although this may be negligible for a computer plugged into the wall, in a car this is the battery-draining equivalent of leaving the dome light on. Thus, a full power down is necessary. Also, many of the shutdown circuits used in conjunction with car PCs completely cut power to the PC, sometimes quite abruptly, making even hibernation (the saving of the system state to disk) out of the question.
Waiting 30-60 seconds for a PC to boot once you get in your car is annoying and keeps car PCs out of the mainstream. When auto manufacturers specify in-car systems such as navigation, they usually insist on very, very rapid boot times, such as 100 milliseconds until the splash screen appears or 300 milliseconds until the system is usable.
The late John Muir took a philosophical approach to waiting for slow starts in his 1969 book How to Keep Your Volkswagen Alive, where he recommended rolling a cigarette and getting a good toke going, by which time the car will be warmed up and ready to drive. However, as smoking anything but cannabis has been all but outlawed (in California at least), the only solution that remains for car PCs is to reduce boot times.
Some basic approaches to reducing boot time are:
Speed up the computer until the slow old OS seems to boot quickly. This includes speeding up hardware and memory or replacing mechanical disks with solid state Flash memory.
Shrink the boot image by removing features so it boots faster.
Use an OS that simply loads another program, such as DOS, and put the hardware drivers in the program itself.
Parallelize the boot tasks, sort of booting everything at once, so all the different drivers and tasks can do their several seconds of waiting at the same time.
Boot in stages so the system appears to have booted because it starts doing something that distracts the user, and then finish booting.
Save a canned memory and system state to disk, so that booting can occur as fast as the memory image can be read from disk (hibernation).
Put parts of software in hardware or firmware, such as replacing the BIOS itself with the OS.
Somehow, never shut down or crash. Run on a microcontroller that takes less than a milliamp of current so you can run off a battery for years.
In subsequent articles, we will be focusing on how to get an operating system to appear to boot instantaneously. We will be basing our analysis on the VIA EPIA-M and EPIA-MII boards, the ones we are using in our in-car computer systems, and discussing the various application needs we are trying to satisfy. We will enumerate some test applications (TiVo for radio), go through the above list and select several boot reduction approaches to try, eliminating those approaches that are unfeasable and/or too expensive. Finally, we will produce a list of all the boot time reducing solutions we have found and report on the boot times we've achieved on our hardware.
Damien Stolarz is an, inventor, writer and engineer with years of experience making different kinds of computers talk to one another. He is the CEO of Carbot, Inc., an in-car computer company, and Robotarmy Corp., a networking software development house.