On a Unix system, ‘init’ is in control. She is your mother, your grandmother and your great-grandmother. Only once in a generation is a new one born; and seeing that happen is history in the making.
The GNU/Linux combination at the heart of Kubuntu and Ubuntu has a design heritage stretching back nearly 30 years. Past when SCO Group starting suing IBM, even further back, past even when SCO had a purpose in life. The Unix design ideas have withstood the test of time, watching the universe expand as time ticks slowly by. We’ll follow that course…
Back through history
Going back in time, we see Ian Murdock start Debian; beyond that Linux Torvalds’ introduction of Linux, we briefly see the 1984 Apple advert flashing on a screen in the background. Accelerating as we continue, past Richard Stallman’s announcement of GNU, finally slowing down, to an era of funky hairdos, prohibited substances and flower-covered VW camper vans. Welcome to the 1960’s.
Over those years, vast swathes of research money has been put into finding out whether the chicken or the egg came first. Unix has always had it simple, init came first. Once the kernel (at the heart of Ubuntu) has been loaded, control is transferred to the first program. This process is given the first process number on the system, 1 (one) in recognition.
Because of the fundamental involvement with initialisation, this first program is normally nick-named init and its job is to start other programs—the ones that make your computer do interesting things and help you to perform work… or play Tuxracer.
Most Linux-based distributions have standardised on a variation of known as sysvinit after the System V (“system five”) variation of Unix developed by AT&T for release in the early 1980’s. sysvinit uses a series of directories named rc?.d where the question mark (?) is a number representing startup, running or shutdown—Red Hat has a good explanation on their site.
The downside is that modern machines are much more magical, they change their configuration in use&dmash;when USB drives are plugged in, or removed, as network connections come and go. Consequently there are alot of waits during the boot sequence to check if things have happened, checking if there is a network connection, or to be able to update the time.
Scott James Remnant preaches to enthralled Ubunteros
Upstart takes shape
What Ubuntu needed is something dynamic, something that reacts, changing as the system does. The result of that is upstart, a new init system designed to based on events occuring. Many people have tried to solve this problem, one of the most famous being ‘InitNG’, but as upstart primary author Scott James Remant tells us on his highly detailed blog post:
the difference in model can be summed up as “initng starts with a list of goals and works out how to get there, upstart starts with nothing and finds out where it gets to.”That is say, unless a message comes in to say that the network is up, then DHCP will not attempt to automatically get an IP address. In addition, unless a messages comes in saying that there is a successful connection to the outside world then network programs like the Apache web-server will not need to be started.
The primary drive behide upstart is make the system simpler and more reliable; speed is not the intention, merely a possible, and unexpected, side-effect in the long-run. Some people have already noticed a gain in shutdown speed thanks to the Teardown specification reducing the amount work down on shutdown. Powering-off will now only stop those programs, like databases, that matter require a careful shutdown to ensure data consistency.
Testing out upstart
The excellent news over on the ubuntu-devel list is that upstart is ready for some serious testing. One of the secrets of replacing core software is backwards compatibility, so you can be safe in the knowldge that upstart doesn’t need all the other programs re-writing; it simply drops in using the existing startup scripts.
Scott James (aka keybuk online) is keen for testers already working with the edgy development release, but points out that you’ll need to follow the instructions carefully as replacing a core piece of functionality is no small feat!
Upstart is under development with a promise that the upstart “job files” will change format—a subtle hint not to starting using then natively yet. At the same time, upstart is coming along nicely with rumours of interest already having come from the Red Hat and Fedora camp.
Just like all new features in Ubuntu, what has now become upstart has been tracked through out by using ReplacementInit entry in Launchpad’s Blueprint component. There you can see pretty diagrams of how other development specifications interact with the work done by upstart.
The core init process gets upgraded once in a generation. Welcome to the future. It’s event-based. It’s dynamic. It’s in the Ubuntu development release.