Industry Publications Index ... Click Here




BSD - The Forgotten Public Domain Unix?

Originally published  September, 1999
by Carlo Kopp
¿ 1999, 2005 Carlo Kopp

The massive growth in in the installed base of public domain tools, and especially operating systems, has seen Linux acquire cult status and the reputation, in the eyes of non-Unix initiates, as being the THE public domain Unix. Whilst this is a frequent source of bemusement for the hard core of the Unix systems programming community, it masks a more interesting reality - if you are looking for professional quality public domain Unix, other alternatives to Linux do indeed exist.

While Linux has been lapping up the limelight, the family of BSD offshoots has been quietly expanding and consolidating. In this AUUG special, we will take a look at the evolution of BSD and discuss the currently available offerings, FreeBSD, NetBSD and OpenBSD.

The Taxonomy of BSD

The FreeBSD, NetBSD and OpenBSD operating systems share one attribute which is unseen in almost any other commercial or public domain operating system available today. This is an unbroken evolutionary lineage which can be traced back to the earliest days of Unix.

In practical terms this translates into a level of maturity, and thus both stability and integrity, which is almost impossible to find anywhere else. Commercial Unix has moved to variants of the much younger SVR4, and Linux is but a young pup in this sense. Why is older and more mature of such importance ? The answer is very simple - bugginess and speed. Immature software will nearly always have more bugs than mature software since it has been through a smaller number of bugfix iterations. Speed is a function of how carefully the operating system has been designed, and how many iterations of code tuning have been performed on it. Maturity translates into higher speed since the inner architecture will have been refined more carefully to eliminate bottlenecks, and those pieces of code which have been found to be bottlenecks will have been tweaked to do better.

Indeed the monstrous size and miserable performance of certain proprietary operating systems hosted on desktop machines is a direct reflection of these two realities. In a market which is driven by gadgetry to increase sales to computing novices, bugginess and woeful performance are a direct byproduct of code cobbled together to meet marketing driven deadlines first and foremost.

BSD Unix is the product of almost two decades of systematic and directed evolution, where squeezing every clock cycle out of the processor was often the top priority in the development process. It would not be unfair to say that BSD today is probably the fastest general purpose operating system in existence, with the caveat that better speed is usually only found in specialised real time systems.

Historically the genesis of BSD Unix lies in the PDP-11 period, when a group of Academics at Berkeley in California decided that the AT&T Sixth Edition (V6) Unix could be improved upon. In those days AT&T would licence Unix to Universities on very favourable terms indeed and provided source code as well. Thus 1BSD was born.

As time progressed BSD evolved. 3BSD saw the introduction of virtual memory and demand paging which were features unseen in the basic Unix offering of the period. Virtual memory allowed the programmer the freedom of not having to sweat over memory management in applications, the address space was sufficiently large to render the issue mostly irrelevant. BSD also became a testbed for other interesting ideas and tools, such as the C shell and curses. Many of the standard features and tools we know and love in Unix today started their existence as research projects for CS postgraduates at Berkeley.

The big break for BSD Unix came around 1980, when DARPA, the research arm of the US DoD was searching for an operating system which could be adopted as a standard for defence contractors and research establishments working on defence contracts. The Berkeley CSRG (Computer Systems Research Group) was funded to integrate the the TCP/IP protocol suite into BSD Unix. The resulting product was the 4BSD operating system, which introduced the now very much standard socket, and many of the basic maintenance protocols and tools we see today. The remote shell toolset, comprising rsh, rcp, rlogin, rwho and their siblings, was an offshoot of this development. The now ubiquitous NFS, developed by Sun Microsystems, also cam into existence on the 4BSD operating system.

Sun's relationship with BSD was what catapulted it into the pre-eminent position in the first generation of Unix workstation products. Adopting 4BSD as the basis of SunOS was a bold yet calculated move, aimed at capturing the University and research market which was then wedded to the PDP-11, and very fond of any product which could be tinkered with. With DARPA's drive to standardise on BSD for their new toy, the Internet, Sun simply rode on the wave of growth delivering the product then best able to plug into the embryonic open systems market.

BSD became the standard operating system used by almost every vendor, as the startups and proprietary vendors jumped on the open systems bandwagon. 4.0BSD was followed by 4.1BSD, and then 4.2BSD which was probably the most widely used variant. The 4.3BSD release saw incremental changes, mainly under the skin, and formed the basis of the last variant of SunOS, 4.1.

The Unix wars at the beginning of the nineties spelled doom for commercial large scale BSD as a standard. AT&T USL began to seriously promote their System V Unix as the would be industry standard, while then giants in the proprietary market, DEC and IBM, set out to design their new "industry standard", OSF/1. Curiously enough, OSF/1 used the Mach kernel and built up the rest of the system using a mix of proprietary features, and ideas grabbed from BSD. In the end, OSF/1 was only ever used by DEC (now Compaq), while IBM returned to their trusty AIX, itself saturated with ideas and features borrowed from BSD.

The outcome of the fruitless Unix wars was the players who remained in the market as major suppliers, Sun, HP, SGI all went the route of AT&T Unix, together with SCO, while the two then biggest proprietary vendors, IBM and DEC, stuck to their own creations. In hindsight, the Unix wars were a disaster for the industry, and damaged the market share of all of the players, since many disaffected users turned to Microsoft.

With Sun abandoning BSD as its flagship operating system, funding began to dry up for the CSRG developers. By this time Richard Stallman's Free Software Foundation had set the trend in the research community, and the very late "Net 2" release of 4.3BSD had been purged of virtually all USL code. The Net2 4.3BSD became the basis of the first Intel port, 386BSD, and led ultimately to the public domain 4.4BSD releases we see today.

The final CSRG release was 4.4BSD which incorporated a number of very advanced design features:

  • The Enhanced Fast Filesystem (EFS) which is a tuned and much faster variant of the well established 4.3BSD FFS (used in SVR4 as the UFS).

  • The Memory File System (MFS).

  • The Log Structured Filesystem (LFS), an idea quickly purloined by DEC.

  • Union Mounting which allows multiple mounts on a single mount point.

  • Portals which enable a process to be mounted on a filesystem.

  • NQNFS (Not Quite NFS) which is an extended NFS variant.

There were many other additional features added under the skin, and thus 4.4BSD was arguably one of the hottest operating systems of the day, from a technical perspective. These features were added on to the most mature kernel of the period, producing an unusual hybrid of very new code and very mature code.

The Unix community in the US very quickly and enthusiastically adopted 4.4BSD as the public domain "real Unix", this in a period when most Linux installations still ran on top of DOS FAT filesystems and could not be trusted to remain up for more than hours at a time.

Clearly 4.4BSD was a seen as a serious threat to the established Unix vendors, who recognised that a publicly available operating system with the pedigree of BSD was technically competitive against their variants of SVR4, especially in the bottom end of the workstation market. The real commercial threat in the marketplace, Microsoft, was ignored.

Thus began the foolish affair of the AT&T vs BSD lawsuit, which effectively paralysed public domain 4.4BSD in the critical 2 year period when it was competing head-to-head against Linux. The lawsuit saw AT&T allege the use of their proprietary source code in the design of 4.4BSD, and ended up bogging down UCB, BSDI in Colorado who were commercialising 4.4BSD, and the various vendors of 4.4BSD CD-ROM releases. In the end 4.4BSD had to be withdrawn, and re-released with various bits of the kernel rewritten, as 4.4BSD Lite, a play on Miller's Lite.

Needless to say BSD's loss was AT&T/Novell's gain, insofar as BSD's large scale entry into the public domain market was significantly slowed and the much less potent Linux gained the lion's share of installations, as many users shied away from the BSD offering for fear of having it disappear from under them. Thus the SVR4 vendor community has able to say "public domain Unix is mostly Linux which is not as robust as out products". The real consequence is that many sites who may have opted for BSD on Intel, instead opted for NT. And software vendors shied away from BSD for fear of entanglement. As has so often been the case commercial Unix vendors damaged the collective interest of the Unix community by witless infighting over market share.

Delayed into the "market", 4.4BSD has nevertheless thrived amongst the entrenched fans of classical Unix. The operating system has spawned four basic derivatives, the commercial BSD/OS, Intel hosted FreeBSD, now being ported to Alpha and SPARC, and the multi-platform NetBSD and OpenBSD.

The multi-platform NetBSD and to a lesser degree, OpenBSD, have found a very curious niche in which to exist - replacement of unsupported Unix variants on older Unix workstations. With the demise of BSD and some proprietary Unix's on a range of proprietary machines, the vendors have progressively abandoned their users. Sites like Universities, which have large inventories of older machines which are still useful as Xterminals and teaching platforms, are frequently confronted with the problems of what to do with them, once the supplied X11 server has gone "stale" and other tools fall out of sync with current standards. Often such machines have high quality fixed frequency 19", 20" or 21" monitors which are too good to throw out, but are difficult to transplant on to PC hardware, given poor support by the vendors of fixed frequency PCI graphics cards.

Retention of the existing investment is cheaper than replacement, and public domain 4.4BSD enables that. On some platforms the 4.4BSD runtime environment has been adapted to handle emulation libraries, so that native 4.3BSD binaries supplied with the original vendor operating system can be run under the 4.4BSD port. This also means that existing investments in commercial software can be retained - porting is often simply not required.

FreeBSD, the "specialised" Intel variant of 4.4BSD, has become a popular platform in the ISP community, mainly because its network protocol stack is much more efficient than that in SVR4, or Linux.

Emulation libraries for Linux and SCO mean that commercial software written for either can be run under 4.4BSD. A frequently heard anecdote is that on any given Intel box, the tool is likely to run much faster under 4.4BSD with the emulation library, than native Linux ! Judging from experience running Wolfram Mathematica, StarOffice, Acroread and other tools in their Linux incarnations, this is almost certainly true !

The three variants all offer Intel ports, and while some measure of competitiveness exists between the three groups, the relationship is also symbiotic in that pieces of source code do drift across between the three variants. Whether we see a genuine long term effort to fully standardise and merge the three remains to be seen. More than likely, we will see similar fragmentation to that seen in the Linux development community. Interestingly enough, some Linux code, especially device drivers, has also found its way into 4.4BSD, albeit very substantially rewritten due to the different kernel interfaces.

FreeBSD

FreeBSD (http://www.freebsd.org) is the most widely used and best known of the 4.4BSD variants, largely due to the projects primary focus upon the Intel PC as a platform. The history of FreeBSD can be broadly split into 3 periods.

The early period was the life cycle of the original 386BSD/4.3BSD based FreeBSD 1.0-1.1 variants. These were quite demanding to install and set up and best compared to doing an original 4.xBSD install off a Berkeley tape on to a VAX. Plenty of loose ends and a nightmare for a non BSD literate.

The " 4.4BSD Lite Release 2" period followed soon after, and saw the system very quickly mature into a package which was close to commercial quality, if not better in some areas. I have run 1.1.5, 2.0.5 and 2.2.2 on my home system and can honestly not fault 2.2.2 in any area, performance is superb, reliability exemplary and setup relatively undemanding. Tools which are not present in the comprehensive CD of precompiled binaries are usually very easy to compile up, the usual trick is to use the defaults for SunOS.

This year has finally seen the new FreeBSD 3 hit the streets in quantity as part of the "stable" series of releases, as compared to the "developmental" code releases. The aches and pains of unstable OS components are bypassed in the FreeBSD world by the maintenance of two discrete code streams, stable being intended for commercial or reliability sensitive users.

FreeBSD 3.2 is impressive, with bundled features such as a symmetric multiprocessing kernel, and Vinum Volume Manager, inspired by the Veritas LVM used by HP, and providing a number of RAID modes (RAID 5 being commercial and not bundled). Therefore it is now feasible to set up a large dual CPU Pentium with RAID or striped disks using straight-off-the-CD-ROM FreeBSD 3.2.

The currently active development projects list for FreeBSD covers several pages and is simply too big to reproduce. Interesting items include support for mounting NTFS filesystems, the Coda distributed filesystem, the Tertiary Disk project to aimed at creating huge filesystems over multiple machines, the V9FS memory filesystem using the Plan-9 model, the Drawbridge firewall, DHCP, a revised driver framework for the OS, ATM support, integrated ISDN support, the CAM SCSI interface, Token Ring support, a USB driver and many more.

Ports for the SPARC and Alpha are now under way, overlapping with the NetBSD/OpenBSD effort. An SVR4 emulator is now available, intended to run Solaris/x86 binaries. The Linux Threads under FreeBSD scheme will allow the running of applications compiled under the Linux threads environment. Embedded developers will be most interested in the PicoBSD system, aimed at tiny system configurations and bootable on an 8 MB 386SX from a 1.44MB floppy.

The PAO laptop package is also now maturing (reviewed in our recent feature on laptop Unix).

X11 support is provided with the XFree86 server, although commercial XiG or Xsuse servers are also available for it.

FreeBSD is the native platform for the Apache server, is used by Yahoo as their web server platform, and ftp.cdrom.com claim to hold the record for a sustained FTP transfer performed on their FreeBSD server. At least 1500 organisations employ FreeBSD as web servers or primary routers.

NetBSD and OpenBSD

NetBSD (http://www.netbsd.org) and OpenBSD (http://www.openbsd.org) developed in parallel with FreeBSD, and are essentially splinters of the one original project. Both are based on the 4.4BSD Lite source tree, with a range of additions. Therefore OpenBSD may be regarded to be a variant of NetBSD, maintained and distributed mostly from Canada and therefore legally exportable with strong encryption, which is not permitted from the US.

While FreeBSD focussed on the Intel 86 architecture, NetBSD from the outset aimed to be a multiplatform BSD port. At this time a very broad range of diverse machines is supported by NetBSD 1.4 and OpenBSD 2.x:

  • DEC 64-bit Alpha (NetBSD/OpenBSD), covering the 3000/300, 3000/500, AlphaStation 200, 250,255, and 400, Digital AXPpc, Digital EB64+, ALPHABook 1 and AlphaStation 500/600 systems. Available on CD-ROM.

  • DEC VAX (NetBSD), covering the 11/78X, 11/750, 8600 and 8650, 8200, 8250, 8300 and 8350, MicroVAX II, MicroVAX III, MicroVAX 3200, 3300, 3400, 3500,3600, 3800, 3900, VAXstation 2000/MicroVAX 2000, VAXstation 4000 model 60, and VAX 4000/300. NetBSD would still appear to be the only public domain alternative for the VAX architecture.

  • DEC MIPS (NetBSD/OpenBSD), covering the DECstation and DECsystem 2100/3100, DECstation 5000/20, /25, /33 and /50, 5000/120, /125, /133 and /150, 5000/200, 5000/240 and /260, DECsystem 5900 and 5900/60. The 5100 port is partially implemented but incomplete at this time.

  • SPARC 32-bit (NetBSD/OpenBSD), covering the sun4m (4/600, Classic, LX, SS4, SS5, SS10, SS20, SS5/170 Transtec, DTKstation/Classic+, Sun Voyager), the sun4c (SS1, SS1+, SS2, IPC, ELC, IPX, and SLC), the sun4 ( 4/100, 4/200, and 4/300) these ports including the VME cgtwo, Sbus cgthree, Sbus cgsix, bwtwo, P4 framebuffers and accelerators. This port originated from the LBNL port and has since evolved. SPARC 64-bit (NetBSD), covering the Sbus based UltraSPARC machines, but not yet the PCI machines. This port is immature and only recently released.

  • 68k Sun 3 (NetBSD), covering the 3/50, Sun 3/60, Sun 3/75, Sun 3/80, Sun 3/100, Sun 3/200, Sun 3/400 and includes support for Xylogics 450/451 and 753/7053 SMD controllers, Sun-3 VME SCSI.

  • 68k HP/Apollo (NetBSD/OpenBSD), covering the 68020 ( 318, 319, 320, 330, and 350), 68030 (340, 345, 360, 370, 375, and 400), 68040 (380, 385, 425 , and 433). Some hardware does not have support for frame buffers.

  • 68k MVME (NetBSD/OpenBSD), covering the Motorola VME bus based MVME147 and MVME167 SBCs.

  • 68k Apple Mac (NetBSD/OpenBSD), covering the Mac II, IIx, IIcx, SE/30, IIci, IIsi, IIvx, IIvi, Performa 400/405/410/430, 450, 460/466/467, LC/Performa 520, 550/560, Performa 600/600CD, MacTV, LC II, III, III+, Centris 650, Quadra 610, 650, 700, 800, Quadra/Centris 660AV, Quadra 840AV, Quadra 630, Centris 610 (1.4), Quadra 610 DOS (1.4), Quadra 605 (1.4), LC 475, Performa 475/476, LC 575, Performa 575/577/578,, LC 580, Performa 580/588, LC 630/630 DOS, Performa 630/631/635/636/637/638, Performa 640 DOS, PowerBook 170, PowerBook 550c. OpenBSD supports further PowerBook models. Some models lack FPU support, and there are problems with some of the 24-bit graphics adaptors.

  • 68k NeXT (NetBSD), a very recent port covering the NeXT_X15, NeXT_WARP9 and NeXT_WARP9C 68040 based machines.

  • PowerPC Apple Mac (NetBSD), is another recent port covering the Apple Power Macintosh 7300/7600, 8500/8600, 9500/9600, G3 MT266/DT233, PowerBook 2400c/180, PowerBook 3400, Apple iMac, Blue G3, PowerBook G3/400, UMAX Apus2000, PowerComputing PowerWave 604/120, Motorola StarMax 3000/240, and Power Macintosh 7500.

  • The Intel 86 architecture is supported by both NetBSD and OpenBSD.

These mainstream machines are not the only ports available, since NetBSD or OpenBSD, or both, are available for 68k Amiga, arm32 Acorn RiscPC/A7000, 68k Atari TT030, Falcon, Hades, PowerPC BeBox, MIPS Sony NEWS 3400, NS 32k PC532, MIPS Acer Pica, and 68k Sharp X680x0.

A veritable menagerie of machines !

Understandably, as a volunteer effort, not all of these ports will be rock solid, or complete, so owners of older machines with oddball or less common peripherals and I/O boards may be left out in the cold, but nevertheless this is by any measure an impressive accomplishment.

I cannot help but chuckle at the thought that in a few years a bunch of part time volunteers have managed to achieve what our vendor community has never been able to do - true standardisation across a huge range of platforms.

This raises interesting issues across the board, but perhaps the most important one is basic agendas. The BSD volunteer developers aim for standardisation since they are part of the user community, and reflect the user community's interests. The vendor community have failed since their agenda has always been differentiation, to aid in marketing against similar but competitive hardware.

The Future of BSD

As with anything in the computing world, predicting the future is fraught with dangers. Can we discern a trend with BSD ? At this point in time it is clear that BSD is just beginning to pick up momentum, after a fairly slow start.

What BSD does offer is the potential for is a standard Unix across all mainstream industry architectures, offering users a truly homogeneous multi-platform computing environment, something which has eluded the user community to date. All based on a high performance, mature and robust kernel and standardised public domain toolset.

Will the vendor community cooperate or resist ? Apple's Darwin has been crafted around substantial chunks of the BSD source tree, but one vendor maketh not a trend. With the enormous investment of manhours many vendors have in existing SVR4 or other proprietary Unix variants, they are unlikely to budge unless it becomes clear that they will lose sales.

Can we expect convergence between NetBSD, OpenBSD and FreeBSD in time ? This is another excellent question. Will Linux swamp BSD out of existence, as it matures and becomes more reliable (even if its reliability already beats certain proprietary operating systems) ?

Will BSD and Linux be able to challenge the existing desktop monopoly, as they mature ? This is yet another excellent question.

As an eternal optimist I hope to one day see the "open source mammals" triumph over the "proprietary dinosaurs". The question is - what kind of comet will it take to make this happen ?




$Revision: 1.1 $
Last Updated: Sun Apr 24 11:22:45 GMT 2005
Artwork and text ¿ 2005 Carlo Kopp


Industry Publications Index ... Click Here