Saturday, March 24, 2007

Plan 9


Har man inga andra planer drar man till med Plan 9, planen som enligt filmen innefattar "the resurrection of the dead". I fallet med Bell Labs operativsystem med namnet Plan 9 kan man kanske se det som att Unix var liket man skulle återuppliva.

Varför då gå tillbaka till ritbordet? Såhär uttrycker de det:

Before Plan 9, we were running lots of Unices held together by a few networks, a remote file system (different uid's on each Unix), and a bunch of remote execution commands. We hated it since it was much harder to manage and use than our old single multiuser machine. We wanted an environment that not only put together a lot of boxes and made them look like one but which also would make use of the new technologies that were appearing (SMP's, heterogeneous architectures, juke boxes, ...).

The thought was that the new environment wouldn't change from Unix except where we thought it would make our goal easier to build. The kernel had to go. The single monitor view of the Unix kernel was a real pain for making good use of the SMP's. Therefore, we started that from scratch. That didn't mean that the kernel interface had to change though. That was a separate topic. Lots of others have rewritten the kernel from the ground up while maintaining something that looked more like a Unix.

Ken and Rob thought up the idea of building everything around a single file system protocol. They also added the idea of a subjective namespace to try to unify all the binding ideas of Unix. This name space is the one thing underlying Plan 9. We could have done the same thing to a Unix kernel (with an infinite amount of sweating) but the result would have been the same from the user standpoint, i.e., a system that looks very different. The ease which with it can be done can be witnessed by the number of failed/stalled attempts to add the Plan 9 namespace to Linux ...

Also, we were tired of the general kitchen sink nature of Unix, especially of System V. If there were 3 projects or groups to do a single thing (like character processing, shared memory, networking, ...) they all eventually got jammed in. We wanted something simpler to work with.

Lastly, we had all developed an extreme allergy to code filled with #if, #ifdef, #else, #elseif. Getting rid of that cruft by sticking differences into separate files/routines required a hell of a lot of rewriting.

So the result was a different kernel, with a different design philosophy, a similar but different interface, but mostly the same old commands.

If you think that Unix was just a single track in comparison, you're sadly mistaken. We just made more of a bend than others did.

We are guilty of rewriting commands just for the sake of doing it. The reason there was sometimes legitimate, to match our different kernel interfaces or whatever. However, it was just as often so we wouldn't have to worry about Unix licenses.

(Dave Presotto's 9fans post (from 7 May 2003))

Hur blev det då? Plan 9 har nått fjärde utgåvan sedan det först kom 1993 och det har redan lämnat ett grafiskt gränssnitt (8 1/2) bakom sig och man kör numera något som heter Rio för att få ett grafiskt läge. Det är primitivt, bökigt och oförlåtande att ta sig igenom installationen, skapa sin första användare och få den upplösning man vill ha. Och Rio är definitivt annorlunda att jobba i...

Men sedan blir det mer likt Unix, man har ett skal, Rc, och man kör mestadels kommandon portade från Unix. Specillet mycket mjukvara finns inte färdigt till systemet men det följer med vektyg för att själv skriva och kompilera.

Mer när jag använt det mer.

No comments: