gnu/linux, ubuntuNovember 3, 2006 5:04 pm

Young Upstart

As promised this will be the first in a series of posts about Ubuntu 6.10.Ubuntu logo

Probably the most talked about feature of the new Ubuntu is Upstart. This is an event-based, asynchronous sysvinit replacement. Most users will just notice that their computer boot and shuts down faster (significantly faster in my case).

Upstart is being developed by an Ubuntu developer, Scott James Remnant, but it’s hoped that most other distributions will also use it in future.

Oldskool init

From Wikipedia:

init (short for "initialization") is the program on Unix and Unix-like systems which spawns all other processes. It runs as a daemon and typically has PID 1.

The functionality diverged considerably between BSD and System V. The usage on most Linux distributions is compatible with System V, but some distributions, such as Slackware, use a BSD-style and others, such as Gentoo Linux, have their own customized version.

Given that Upstart was largely designed to replace sysvinit, and retain compatiblity, I shall cover it briefly here.

Runlevels

sysvinit uses "runlevels". The initialisation process involves starting services and performing tasks required for each runlevel, before moving on the next. Most machines will continue until reaching the multiuser runlevel, which on Debian and Ubuntu happens to be 2.

Order

This process requires that things are done in a predefined order, and relies on hardware being in a suitable state before things can move on.

Upstart

Upstart was designed to solve two main problems. Boot/shutdown speed, and modern hardware flexibility. It also aims to do this in a compatible manner, allowing affected programmes to run unchanged.

Speed

This problem is solved by making Upstart asynchronous. That is, it will perform number of tasks at once, rather than doing everything in a linear fashion. The difference is quite noticeable.

Flexibility

When System V was written, you could rely on hardware being available at specific times during the boot process, and that disks were always there. Today’s computers are far more flexible. You may want your home directory to be mounted on an external USB hard disk; your network card may be a wireless USB dongle; a network drive may only be available when you are within range of a Wireless Access Point.

Upstart tackles this issue by being event-based. When certain hardware is available, or a subsystem is running, then it will perform appropriate tasks - such as mounting the external drive as /home when the USB subsystem is up.

This should mean that unnecessary services are not started, which should mean a reduced memory footprint, and improved performance. Also, Upstart restarts services if they crash, reducing the need for reboots.

Compatibility

One ingenious aspect of Upstart is that it has been designed to be compatible with sysvinit. This means that it’s almost a drop-in replacement, but still gives the increased performance and flexibility.

Upstart has its own format for tasks, but achieves the compatibility by also supporting sysvinit scripts.

Future

Ubuntu also hopes that Upstart can replace cron, atd, and inetd.

Cutting Edge?

Is Upstart cutting edge?

Upstart uses a very different approach for the initialisation process. It also surpasses other attempted replacements, such as Initng, in features, ingenuity, and success.

Yes, I would say that Upstart is cutting edge. 

I look forward to seeing the further developments of Upstart, and its adoption by other distributions.

Links:


GNU Free Documentation License

Copyright (c) 2006-2007 Michael J Kaye.

Permission is granted to copy, distribute and/or modify the content of this blog post under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

Comments »

The URI to TrackBack this entry is: http://cuttingfree.blogsome.com/2006/11/03/young-upstart/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.