2012-08-31
A small rant about looking down on Linux users
Sometimes, in some quarters, it is popular to say that the reason people use Linux is that they don't know any better. If they had been (properly) exposed to the magnificence of the *BSD of your choice, Solaris, or whatever, these Linux users would immediately understand and switch. If they were exposed to these Unixes and did not switch, it would clearly be because they had been damaged by their Linux experience and did not understand the true appeal of Unix; they were clearly too used to the gimmicks and glitz of Linux to really appreciate good stuff, and should perhaps migrate to Macs for even more glitz.
This is various sorts of hogwash. It is also startlingly arrogant, since it presumes that Linux and Linux distributions have no actual appealing elements to anyone with any brains and taste, and betrays an ironic lack of historical awareness given that the Lisp people raised pretty much the same indignant complaints against Unix way back when.
One of the ways that it is hogwash is that its premise is demonstrably wrong, and I'm an example of that. While why I use Linux is a complicated subject and I may or may not have taste, my continued use of Linux is definitely not through ignorance of the elegant Unix alternatives. Rather the contrary, in fact. I've used and worked deeply with plenty of versions of Unix over the years, and I still like Linux. Although I haven't tried to conduct an ethnographic survey, I'm pretty confidant that there are any number of old Unix hands who think that Linux is perfectly fine.
(A certain number of those old hands will look at you oddly if you get very worked up over which Unix you use. They're all Unix, after all. I'm not quite one of these, but a lot of that is because I'm a sysadmin so the fine details of how systems work and are administered do matter to me.)
(Of course and as always, if you ignore how real people actually behave in the real world you are ignoring the real problems. This is part of what happened to the Lisp people way back when and in my view they've never recovered from the resulting bitterness; it would be a shame to see the general Unix community go down the same road. And yes, saying 'people behave like this because they're ignorant' usually is ignoring how real people actually behave.)
2012-08-15
The historical background of the *BSD 'base system' versus Linux
One of the periodically cited differences between Linux and the *BSDs is the *BSD idea of the 'base system'. In the *BSD world, this is the source tree for the kernel, the core runtime libraries, and whatever user level programs the *BSD considers sufficiently important and central; it is maintained (and distributed), essentially as a unit, by the *BSD's developers. Linux has no similar concept; the kernel is maintained and distributed by one group, the usual runtime library by another, and so on. Linux distributions have the job of assembling all of the bits necessary to make a coherent system.
I feel that one important thing to understand about this difference (especially before you start putting a lot of philosophical weight on it) is that it is in large part a product of history, specifically the history of each project.
All of the *BSDs are the literal descendents of BSD Unix, which itself is a direct derivative of the original Research Unix (specifically V7 Unix). From the beginning, Research Unix was developed as a single unit (partly because the people behind it had no choice) and then distributed that way, as just one big pile of binaries and source code. When UC Berkeley started distributing BSD, they of course continued things this way (for all sorts of reasons). Right from the start of their life, all of the *BSDs inherited this via 386BSD; in fact, they literally inherited a large source tree that contained the kernel, libc, commands, and so on. In this environment it would have taken extra work to not have a 'base system', work to split everything apart (and probably to create a dependency management system).
Linux came about completely differently. Linus Torvalds was interested in writing a kernel, but I don't think he had much interest in writing all of the user-level programs and libraries to go with it. Linux also was created at a time when there was an ever-increasing amount of open source versions of standard Unix commands being written by various other people and groups (most prominently the FSF). Most of these programs weren't being written for Linux (at least not initially); instead they were being developed independently for general use on all of the current Unixes. Naturally this created an environment without any attempt at a single source tree that claimed ownership of all of the pieces of a running Linux system (because such a claim would be absurd).
Or, to put it another way, from the start the *BSDs were developers (of the source trees they inherited from BSD Unix) and Linux distributions were aggregators (of general work being done independently by lots of separate developers). The nature of each was essentially forced on them by their surrounding circumstances; in each case it was the easier approach, sometimes by far.
It should be emphasized that the BSD source tree inheritance was the result of work by the original UCB developers of BSD Unix, who systematically worked to remove AT&T copyright code not just from the BSD kernel but from the entire BSD codebase (cf). Had UCB worked only on freeing the BSD kernel, most *BSDs might well look much like Linux today (and for the same reasons).
(This entry was sparked by reading this (via). Note that I do not endorse that article (for various reasons) and it's clearly outdated. Still, an interesting read.)
2012-08-06
The (possibly apocryphal) story of System V IPC's origins
Back in SystemVSHMLimits I mentioned in passing that I don't have a high opinion of System V IPC in general. This goes back to the general attitude to it from (some) old Unix hands that I absorbed as a young Unix person (I'm not entirely sure where from by now), and especially the story of its origins. Unfortunately I don't have handy access to the necessary research materials right now, so let's call the following story folklore.
(The interesting thing about Unix folklore is that it continues influencing people whether or not it is actually true. This case is one example of that, where a possibly apocryphal story has shaped my dismissive attitude towards a Unix feature.)
If you've looked at System V IPC, you may have scratched your head a bit over it. What we call 'System V IPC' is actually three separate IPC mechanisms which seem barely related to each other, and none of them are very Unixy. The story I heard starts when Bell Labs released V7 Unix. One of the things that happened with V7 is that various groups inside AT&T picked it up for their projects and, in the way of things at the time (especially given V7's not entirely finished state), each of them modified the system a bit to meet their local needs (thus spawning a constellation of internal AT&T Unix versions). As part of this fragmentation, three of the groups doing things with Unix all decided that they needed an IPC mechanism. Working independently, each came up with something that was more or less like one of the current System V IPC systems, implemented it in their version, and was happy.
(Many of these AT&T modifications were not very Unixy because they were often designed by people who just wanted to get something done with the system and who had not really absorbed the Unix philosophy. Of course this was not unique to AT&T; many groups made not-very-Unixy changes to V7. Some would say that this included UC Berkeley when they made BSD Unix.)
Then AT&T management showed up; someone decreed that AT&T was spending too much effort maintaining too many different versions of Unix. All of the AT&T Unixes were to be unified into one, managed and maintained by a single group. Of course, as part of this all of the changes that all of the groups had made needed to be merged back into a common version. This was, shall we say, a somewhat political process; many groups were not happy at the thought of losing 'their' features and so pushed for them to be included in the official AT&T Unix, no matter how well they fit. This included all three groups that had invented their own IPC mechanism; none of them were willing to compromise and each of them insisted that their mechanism just had to be included. In the end the gatekeepers for AT&T Unix threw up their hands and said 'okay, you win, we'll support all three different IPC mechanisms'.
And that, so the story goes, is what gave us System V IPC. Because of a political compromise we got stuck with three different and partially overlapping IPC mechanisms, all of them not very Unixy and all of them with oddities. Is it any wonder that old Unix hands look down on the whole mess?
(Or at least that one can make a story where old Unix hands look down on the mess.)