|FreeBSD - Real Public Domain Unix|
|Originally published February, 1996|
|¿ 1996, 2005 Carlo Kopp|
|One of the nicest side
effects of the 1990's has been the dramatic improvement in Intel
architecture machine performance to price ratio. This has made the
humble Personal Computer a viable platform for running Unix and
Unix-like operating systems, and this has in turn resulted in the
steadily increasing proliferation of public domain Unix derived
Of these, the two most significant players are Linux and
FreeBSD, with the former holding a bigger share of the "market", should
we wish to use this term. In the author's experience, Linux supporters
will vociferously defend their operating system, even in the face of
good and technically substantiated critique, so in the interests of
harmony in the user base, the author will not attempt to compare Linux
FreeBSD - a Brief Genealogy.
FreeBSD has the very nice attribute of having an almost contiguous genealogy which may be traced back to the early days of Unix. Indeed, it was this heritage which was almost the undoing of the product, during the early nineties, when AT&T USL and subsequently Novell sued the University of California, Berkeley, over rights to the source code. The Monopolists did their best, and happily, failed, so today anybody can enjoy the fruits of over a decade's worth of systematic and focussed UCB Unix R&D effort.
The origins of BSD lie, of course, in the murky past. During the mid seventies, in the days of the venerable PDP-11 (nothing like setting address/data switches to start the boot process ... ah, those were the days of real computers !), a group of enterprising academics at Berkeley created 1BSD by appropriately hacking the Sixth Edition (V6) of AT&T Unix. As time progressed, BSD evolved, and 3BSD for instance saw virtual memory and demand paging added to the somewhat austere standard offering. This allowed the running of programs with significantly larger address spaces than previously used.
BSD's climb to stardom started around 1980, when the US Defence Advanced Research Projects Agency (DARPA, later ARPA) funded the Berkeley CSRG group to integrate the TCP/IP suite of protocols into the BSD Unix operating system, to provide a standard operating system for use by DARPA's research contractors. Thus was born 4BSD, which during the eighties became the dominant variant of Unix in the minicomputer and workstation market. Much of Sun's early success in the marketplace stemmed from its use of a variant of what was essentially the standard academic and defence research contractor OS environment.
Much of the success of 4BSD against its purebred cousin, 32V, resulted from its performance driven design features, and for the period, very good support of third party peripherals. 4BSD's support for third party dumb terminals was a major factor in the popularity of the OS, particularly with sites which had a large investment in existing dumb terminal installations. 4.2BSD became the defacto standard in such sites, and introduced a powerful suite of networking utilities ( rsh, rcp, rlogin, rwho etc), which are still commonly used today.
The following 4.3BSD release included a number of changes, mainly in networking code, which were largely hidden from the user, and the follow on to "standard" 4.3BSD, the 4.3BSD Tahoe release added support for the CCI Tahoe minicomputer, as well as the then "standard" DEC VAX platform.
By the late eighties, the Intel 386 CPU chip began to proliferate in the marketplace, introducing the very useful facility of paged virtual memory support in hardware, on chip. With a useful amount of CPU performance, relatively low cost against the workstations of the period, a paged virtual memory support in hardware, the i386 became an obvious target for the zealous BSD porting community in the US.
AT&T's licensing restrictions created much unhappiness in the BSD community, particularly since substantial portions of the later 4BSD code were wholly home grown, and used what many considered only "trace concentrations" of original USL code. Here is where things become interesting, because the first "free" Unix came into existence. This was the result of Berkeley producing the "Net2" release of 4.3BSD, which contained all but the USL code. This fairly quickly led to the production of 386BSD, which spawned two notable offspring, the FreeBSD 1 release and the multi-platform NetBSD, which has been, in various incarnations, ported to the Sun 3, SPARC, HP and Amiga.
This however isn't quite the end of the family tree. CSRG at Berkeley continued their research work, producing the 4.4BSD release. This release is by all means the "ultimate" BSD Unix derivative, with advanced design features such the Enhanced Fast File System (EFS), Memory File System, NQNFS extensions to NFS, Log Structured File System (LFS), union mounting (allowing multiple mounts form a single mount point), Portals (mounting a process on a filesystem) and a large number of detail changes hidden from the user.
Needless to say, the distribution of 4BSD derivatives in the public domain made USL, and later Novell, sufficiently unhappy to litigate, and this situation persisted until a settlement was reached in 1994. AT&T's, and later Novell's, persecution of the BSD community is hard to understand, in the context of a time when the greatest visible threat to PC hosted Unix was in fact the flooding of the market with Microsoft Windows. The resources expended in the legal assault against the BSD developers and vendors could have been far better used in building market share. But then, so could have been all the resources expended in the totally worthless "Unix Wars" between the UI and OSF camps. It would not be unreasonable to say that the deep-seated and traditional divisiveness between various "camps" and "factions" in the Unix community has been the biggest single impediment to the adoption of Unix as a uniform standard operating system. If the time and effort expended in recent years upon internecine fighting were focussed on the real "enemy", proprietary closed operating systems and their vendors, the marketplace would look very different today.
The dust has now settled after the Unix Wars, and the BSD
suits, and what we are left with are three mainstream offspring of 4BSD.
One is DEC's OSF/1, a substantially hacked and modified commercial
system derived from 4.3BSD, BSDI's BSD/OS, a proper commercially
supported standard 4.4BSD, and the public domain FreeBSD 2.x 4.4BSD.
The mainstream workstation vendors have largely jumped upon the
USL/Novell bandwagon, and use derivatives of SVR4, such as Solaris 2,
Irix 5 and HP/UX 9. IBM chose to do their own thing, and run the
substantially home grown AIX.
The first release of FreeBSD was derived from 4.3BSD and perhaps unfortunately, released somewhat prematurely into the user base. Installing 1.1 was good fun, if you like tinkering with OS installations and have plenty of time to burn. The author's view is that a 1.1 installation process was probably best compared to installing a 4.1 release from UCB off a tape. Lots of loose ends which required many hours to debug, with a good knowledge of BSD internals being a distinct advantage. The end result was however well worth the effort, and the author was favourably impressed with the robustness of the product. One kernel panic in 12 months of operation compares very well with most early releases of commercial operating systems.
The author found that FreeBSD 1.1.5 delivered satisfactory performance even with as frugal an installation as 8 MB of memory, certainly speed performance on a 486DX2/66 could be best compared to a SPARCStation 2. For a $3000.00 computer and a $40.00 CD-ROM, that is very hard to beat.
The principal failings of FreeBSD 1.1 and the later 1.1.5 lay
in a number of buggy utilities, a limited bundled toolset on the CD-ROM
and the difficulty in installation, which an inexperienced user would
probably break their teeth on. Importantly, the base OS was quite robust
(the author knows of at least one Internet provider who uses it as their
primary platform), and using the original UCB source, had excellent
network performance. Many users sadly turned to Linux, when confronted
with FreeBSD 1.1, which is unfortunate. The subsequent FreeBSD 2 has
none of its predecessor's failings.
The second release of FreeBSD is a far cry from the first, and in the author's opinion, for what it is worth, compares very favourably with any mainstream commercial Unix release, particularly the 4.3BSD SunOS. FreeBSD 2 is based upon the 4.4BSD-Lite, or "unencumbered" source release of the operating system, purged of all remaining traces of disputed code. It is a fully featured BSD system with all the tools and utilities required to run a networked X environment.
As public domain code its distribution is not subject to any constraints, other than the copyright or copyleft arrangements associated with source code provided by various contributors. The current CD-ROM release is FreeBSD 2.0.5 (the second CD-ROM release), which is supplied on a pair of 9660 format CD-ROMs.
A user wishing to install FreeBSD will face his biggest risks
not in the operating system, but as with all PC hosted Unixes (NB: this
is largely true for PC hosted SCO Unix as well as Solaris), the
hardware. For this reason we will discuss the issue of PC hardware in
somewhat more detail.
Selecting a suitable combination of boards is without doubt the single most difficult problem to dealt with in any PC hosted Unix installation. Given the enormous variability in motherboards and add-on boards, the profusion of clones of "standard" boards, and clones of clones of would be standard boards, this is hardly surprising.
There are a number of traps for beginners in this area, the most common of which is the imperfect clone of the "standard" board. Unlike DOS and MSW environments, where device drivers for the OS are supplied with clone boards, kludges and workarounds for broken hardware and bad design (or poor reverse engineering) included, in the Unix environment you are largely dependent upon the driver suite packaged with the operating system. We have yet to see the day when a vendor of a third party I/O board ships a range of OS (eg FreeBSD, BSD/OS, SCO, Solaris and Linux) drivers, as has been the case for a least a decade in the mainstream workstation and server market.
The typical symptoms of a poorly reverse engineered board are that most of it works as expected, but some particular feature may not behave properly. A good example which the author can quote is that of a serial board, where the flow control did not appear to work in one direction. A closer examination of the board indicated that the proper Silicon had been used, but the cloned printed circuit board simply did not have all the wiring which should have been between the serial chip, the I/O buffer chips and the connector on the back-panel. With some highly sophisticated "poll the port in a loop forever" DOS hosted comms package this simply was not an issue. However, trying to use a simpleminded Unix interrupt driven flow control scheme brought us to grief. Half a day wasted and a different serial board solved the problem.
In the author's experience, most generic motherboards will usually run, either with Pentium or 486 CPUs. Whether to use a Pentium is a good question, in that the OS binaries are compiled with a generic "Intel" optimisation that will not exploit the Pentium's dual pipeline. A number of performance tests the author ran on X intensive workloads, using the similar commercial BSD/OS (BSDI) 2.0.1, suggested that that there was little difference to be found between a 486DX4/100 and a 100 MHz Pentium. Unless there is a good reason to use the Pentium, such as a specific heavily used application which runs particularly well with the chip, then the venerable 486 appears to be somewhat better dollar value.
Whether to choose a PCI or VLB bus motherboard will be driven by cost and the availability of suitable I/O boards.
The biggest problem area is to be found with I/O boards. Serial boards, as noted earlier, can be a problem. Furthermore, the 16550 chip is preferable to the 16450, as it has deeper buffering and can be driven faster. Unlike many workstations, where the serial and floppy I/O do not have DMA support, the generic PC does and thus floppy and serial throughput can be very good without driving the CPU to its knees with thousands of interrupts per second.
A SCSI controller board is highly recommended, as is a SCSI CD-ROM drive. The CD-ROM drive is required for OS installations, and using a SCSI device, rather than the limited range of supported non-SCSI devices, offers much more choice in performance/price ratio. The added bonus with a SCSI board is that you can borrow the company Exabyte drive every once in a while to do a proper backup (dump and restore work very nicely, even between FreeBSD 1.1 and 2.0).
Choice of hard disk is another interesting subject. At the time of writing, IDE disks were still much better dollar value per Megabyte than SCSI disks, even if delivering nominally lower performance. The performance issue is however less important with BSD, as the buffer caching is very effective. If not starved of memory, and not running disk intensive applications, 4.4BSD will deliver excellent performance even with the humble IDE drive, moreso due the faster EFS filesystem. A PCI or VLB controller is recommended here.
The amount of memory required is another important configuration issue. While FreeBSD 1.1 could get by on 8 MB, this is no longer true for 2.0, particularly due the larger 3.1 X server binary. As a result, 12 MB is probably a sensible minimum memory size, with 16 MB being ample for ordinary X interactive use. The sizing rules for a workstation apply very much in this area.
The graphics board is another important decision area. As FreeBSD can run either the public domain XFree86 3.1 X server (http://x.physics.usyd.edu.au/) or the commercial Xinside Xaccel server (http://www.xinside.com), the primary constraint will be what boards your preferred server supports. A wide range of resolutions and speed performance can be achieved by the careful choice of graphics board, so this is one area where some hard thinking is worth the effort. A quite comprehensive survey of XFree86 xbench benchmark results for several pages worth of varying PC configurations and boards has been posted on the Web by Farrell McKay, and this is highly recommended for the serious tinkerer. The highest reported Xstone rating is cca 500,000 for a Matrox WRAM based board running the Xinside commercial server, however since the author has never seen this configuration running, let alone benchmarked it, it will be up to the reader to verify the numbers. There is no doubt that a PC running FreeBSD and a carefully chosen graphics board will deliver 8 bit X performance fairly similar to a low end or middle of the range workstation at a substantially lower cost.
Having worked out a suitable system configuration to deliver
the performance you want, you have one final hurdle to jump. That is
finding a PC hardware supplier who will take your list of boards and
build up a machine exactly to spec, without trying to load it up with
his own "highly recommended" "clone of clone" boards. In the author's
experience, some of these guys can be very hard to convince about the
fact that you definitely do need an original XYZ SCSI or graphics board,
and not his "highly recommended" clone.
.Installation and Setup
The process of installing FreeBSD 1.1 was quite tedious, but this major obstacle to success in the mass market has been rectified in FreeBSD 2.0, which has a very user friendly installation and setup utility, which either boots from DOS or a raw floppy. The setup tool reminds the author most closely of the SunOS 4.1.3 suninstall tool and uses very much the same style of asking a series of questions, prompting the user where appropriate, and then going off to do a full install as per the configuration. The author had some difficulties with part of the package installation phase, covered by the disclaimer that it is still experimental code. Nothing that couldn't be fixed with \fB zcat pkg.tgz | (cd /usr/local; tar xvf - ) where appropriate.
The system as provided in the standard binary install configuration is a full featured 4.4BSD, with a very comprehensive suite of third party tools. So comprehensive is the packages suite in 2.0.5, that the author found 95% of the tools he had installed on the austere 1.1 system were included in the 2.0.5 binary release.
The biggest strength of the system from a user perspective is the large set of development tools. These include gcc 2.6.3, bcc-95.3.12, bison-1.22, dlmalloc-2.5.3b, gmake-3.73, m4-1.4, mprof-3.0, nTk-b3, perl-5.001, xxgdb-1.11, an editor set containing aXe-6.1.2, emacs-19.28, jove-4.16b, jp-cmule-2.2.2, jp-wmule-2.2.2, mule-2.2.2, tkHTML-2.3, uemacs-3.12, vile-5.2, xemacs-19.11, xvile-5.2, a languages kit containing STk-2.1.6, bcc-95.3.12, dgd-220.127.116.11, elk-2.2, g77-0.5.14, gcl-2.0, gnat-2.03, gofer-2.30a, guile-ii, icon-9.0, itcl-1.5, jp-tcl-7.3, mit-scheme-7.3, nTk-b3, p2c-1.21a, perl-5.001, pfe-0.9.9, scheme48-0.36, schemetoc-93.3.15, scm-4e1, tcl-7.3, tclX-7.3b. Users who like to play with number crunching will find a kit containing Fudgit-2.41, blas-1.0, calc-2.9.3, eispack-1.0, g77-0.5.14, gmp-1.3.2, gnuplot-3.5, hexcalc-1.11, linpack-1.0, octave-1.1.1, oleo-1.6, xgraph-11.3.2 as well as the f2c f77 to C converter.
Document preparation is well covered with a2ps-4.3, afm-1.0, dvi2xx-0.51a9, dvips-5.58, dviselect-1.3, ghostscript-2.6.2, ghostview-1.5, jp-groff-0.98, jp-gxditview-0.98, latex-2.09, latex2e-94.12, makeindex-3.0.8, mltex-3.1415, psutils-1.13, rtf2latex-1.5, tex-3.1415, texinfo-2.124, tr2latex-2.2, transfig-3.1.1, xdvi-pl18, xgraph-11.3.2, xtexshell-0.91 and ispell-3.1.18 included.
Users who are fussy about interactive environments will find most of their favourites on the CD-ROM. These include bash-1.14.4, pdksh-5.1.3, tcsh-6.05, zsh-2.6b8 and the ctwm-3.3, fvwm-1.24r, olvwm-4.1, piewm-1.0, tvtwm-pl11 window managers. The twm derivative, ctwm, is worth particular attention as it provides very nice HP-VUE style workspaces, as well as running quickly.
The networking kit is also very comprehensive, and includes archie-1.4.1, cern_httpd-3.0, cern_linemode-3.0, chimera-1.65, dgd-18.104.22.168, fspclient.0.0.h, gated-3.5a10, gopher-2.1.3, imm-3.3, ircii-2.8.2, lynx-2.3.7, mirror-2.3, moxftp-2.2, ncftp-2.0.5, nv-3.3b, pcnfsd-93.02.16, pidentd-2.5.1, pmf-1.13.1, samba-1.9.13, scotty-1.2.0, sup-2.0, tcl-dp-3.2, tcp_wrappers-7.2, tcpblast-1.0, tintin-1.5.6, tkHTML-2.3, tkined-1.2.0, vic-2.6, wu-ftpd-2.4, wwwish-1.0, xarchie-2.0.10, xgopher-1.3.3, yale-tftpd-3.0, ytalk-3.0.2, zircon-1.15.10.
FreeBSD 2.0.5 is a nicely packaged kit with useful public
domain tools for almost every possible situation. In most instances,
very recent versions of the tools are provided, with quite a few
bugfixes against more commonly used older versions.
Performance, Portability and Perspective
Probably the nicest aspect of Intel hosted BSD is performance. This should not come as a surprise, as the history of BSD Unix is characterised by incremental performance improving hacks, all aimed at squeezing the very last clock ticks of performance out of heavily loaded University teaching PDP-11s and VAXes. Furthermore, the networking and IPC components of BSD are still acknowledged amongst the best performing in the Unix domain (or any other for that).
The result can be seen in the humble public domain 4.4BSD, which in the author's view outperforms most of the commercial PC hosted SVR4 Unix derivatives, as well as the much promoted W95, on the same hardware. As the system is provided with bundled source code, and bugfixes and patches are available on the Net (http://www.freebsd.org), support is not the problem which it is often made out to be by commercial Unix vendors.
The biggest limitation of FreeBSD at this time is the poor availability of commercial mainstream applications. Indeed the vendor of a top selling HTML editor when queried by the author as the the availability of a FreeBSD port, responded with the query "what is FreeBSD ?".
Portability of source code appears to be very good, particularly where a SunOS 4.1.3 4.3BSD port already exists. In most instances the quickest shortcut, in the absence of Imakefiles or configure, is to hack the SunOS Makefile.
From a perspective viewpoint FreeBSD 2.0.5 is a robust operating system which is much like the earlier University targeted 4.2 and 4.3 BSD releases, a good general purpose development environment. Whilst it will find its biggest fans amongst home users and in academia, it should not be discounted by commercial sites. It does provide by far the cheapest X environment available, and where there is no requirement to compile on a specific commercial platform, it is a very nice C/C++ development platform. As the system has a dual boot capability, commercial sites wishing to use FreeBSD always have the option of booting into MSW to run Word or Project, and rebooting into Unix to do real work.
In the author's view, FreeBSD is a viable low cost supplement to commercial Unix workstations and the Unix vendor community should encourage its proliferation in order to both displace MSW where possible, as well as to reduce the costs of making users Unix proficient. One of the biggest obstacles Unix will continue to face in many sites is the ages old managerial argument of "why should I buy an expensive Unix box for a beginner who won't get the best use of it". Well, the manager can put FreeBSD on his underutilised 486s and reduce his platform overheads for non-critical users by a substantial margin, while focussing his Unix platform budget on critical machines and software tools for critical users.
There is no doubt that FreeBSD 2.0.5 is an important milestone in the evolution of public domain software, as for the first time a close to commercial quality product is now available at defacto zero cost. It is the author's hope that the Unix community at large will capitalise on this situation and encourage the proliferation of FreeBSD into the wider user base. There is no doubt that FreeBSD 2.0.5 kills the established "high cost" argument against Unix quite dead.
|$Revision: 1.1 $|
|Last Updated: Sun Apr 24 11:22:45 GMT 2005|
|Artwork and text ¿ 2005 Carlo Kopp|