Selasa, 06 November 2007

Why FreeBSD


A quick tour of the BSD alternative


Frank Pohlmann (frank@linuxuser.co.uk), U.K. Technical Editor, Linuxuser and Developer

The FreeBSD operating system is the unknown giant among free operating systems. Starting out from the 386BSD project, it is an extremely fast UNIX®-like operating system mostly for the Intel® chip and its clones. In many ways, FreeBSD has always been the operating system that GNU/Linux®-based operating systems should have been. It runs on out-of-date Intel machines and 64-bit AMD chips, and it serves terabytes of files a day on some of the largest file servers on earth.

The Berkeley Software Distribution (BSD) family of operating systems can be traced back to the BSD UNIX operating system created and maintained at the University of California, Berkeley, since the late 1970s. Today, the BSD family consists of five main branches, and even Linux activists, comfortable with a plethora of distributions, find themselves bemused by the number of BSD flavors appearing in ever-greater numbers. Since 2001, when the last major branch -- DragonFly BSD -- was launched, FreeBSD, OpenBSD, NetBSD, and Mac OS X represent a new creative surge in the UNIX world. All of them are POSIX-compliant. All present similar command-line interfaces to their users. All use kernels and system libraries that make similar programming models and application usage characteristics possible.

For legal reasons, BSD cannot be called a UNIX system, but it is widely accepted that the BSD flavors represent open source UNIX. Amazingly, in the late 1980s and early 1990s, no free operating system worth the name running on the PC or Mac was available. UNIX lived on mainframes and the Scalable Processor Architecture (SPARC). Proprietary UNIX companies had balkanized the commercial UNIX scene.

In the beginning, there was 386BSD

In 1993, two events occurred that were to change the UNIX scene permanently: The NetBSD group was founded, and the 386BSD patch kit was revived. Ten years before, BSD UNIX developers had been recruited from the ranks of U.C. Berkeley staff and Ph.D. students; the money had largely come from the Defense Advanced Research Projects Agency (DARPA), but the funding was coming to an end. The 386BSD project came into being in 1985 as an attempt to get BSD UNIX to run on an Intel chip. The first release did not occur before 1989, and for various reasons, the project ended up becoming a reference operating system publicized by Dr. Dobb's Journal in July 1992. Known as 386BSD 0.1, it experienced 250,000 downloads.

The 386BSD was mainly based on Bill and Lynne Jolitz's ideas to improve the very concepts on which UNIX was based. It was meant to be free, but supporting a complete operating system virtually on their own proved to be beyond the Jolitzes. The system lost out to the armada of programmers joining an almost unknown Finnish student help build Linux.

The history of FreeBSD

Another group that took the original vision of porting BSD UNIX to the Intel chip to its conclusion formed in the course of 1993. Relying on previous work by Bill Jolitz, FreeBSD V1.0 was released in December 1993. Jordan Hubbard, the project leader, drove the project, managing infrastructure and a group of committers that grew to 200 developers by early 1997. FreeBSD is supposed to reach version 6.0 by the end of this year and is arguably the most important of all free UNIX systems. FreeBSD is not a UNIX clone, but rather a system that not only works like UNIX but whose internals and system APIs are UNIX-compliant.

FreeBSD is not the Intel-/AMD-only system it once was. It also runs on SPARC64 machines and has a fairly long history on Alpha architectures. If a BSD user is interested in the chips running Mac OS X, he could switch over to Darwin OS, the open source core of Mac OS X, which in turn relies on much of FreeBSD V5.0 and its successors. NetBSD, of course, has been running on all Mac architectures since 1995.

What FreeBSD does and Linux doesn't


FreeBSD is an operating system, not just a kernel. This statement does not mean quite as much as it used to, however, because the very notion of a kernel is fairly arbitrary. In a UNIX context, it means that users can't access certain libraries and executables after booting has finished. The kernel manages the hardware for applications, even though today many UNIX-type operating systems would give user-level threads a role in managing kernel resources. You can safely assume that anything users cannot access during run time is part of the kernel. This does not mean that users can't influence kernel behavior. Certain utilities can report and tune memory management, for instance, and they are definitely within the purview of the user. These utilities communicate through the system's API, which is not part of the kernel, although it is quite clearly part of the operating system. FreeBSD, of course, includes all these and many other utilities and applications that deal with the characteristics of networking and hardware.

If you were to compare the contents of a complete Linux kernel download and a FreeBSD download, there would be much that the downloads have in common. Both have IP stacks, memory-management routines, file system implementations, and so on. The file system hierarchy has demonstrably similar origins, and most command-line applications have identical names and similar command-line semantics. The actual implementations look somewhat different, of course, but you would still be able to see that both systems have similar conceptual origins. A major architectural difference lies in the way FreeBSD reads and writes files to the so-called buffer cache, which (strictly speaking) does not even exist as an entity separate from virtual memory. Linux has always managed buffer cache sizes automatically, but its memory-management routines work differently from FreeBSD's.

Security and compatibility

Other benefits can influence your choice to take FreeBSD more seriously. Although not in the same league as OpenBSD with regard to code-level security, FreeBSD comes with a formidable array of security mechanisms that work out of the box. Since FreeBSD V5.0, it is possible to add fine-grained access controls and security policies that have their origin in the DARPA-funded TrustedBSD project. FreeBSD supports access control lists (ACLs) and mandatory access control (MAC) modules. The latter is of course accessible only to systems administrators and managers, but it enables small businesses to run networks with fine-grained security measures that apply to subsets of the system exposed to the outside world. UFS V2 has excellent ACL support via extended attributes; you must configure UFS V1 separately if ACLs are a requirement.

If you have been introduced to the mysteries of Linux, you might be concerned to see applications available for, say, SuSE Linux and Mac OS X, but have no separate source or binary for FreeBSD. FreeBSD is able to run a Linux binary compatibility module, which you must enable at installation time or from the command line. Linux run-time libraries might be required, as well, but you can add them from the Ports collection.

Of course, FreeBSD runs all major X Window System-based desktop shells, such as the KDE desktop and the GNU Network Object Model Environment (GNOME) desktop. FreeBSD used to be the desktop user's UNIX version of choice until the FreeBSD-based OS X came along. It still gives UNIX users operating under budgetary constraints an extremely good deal and does not require additional licenses when configured as a server or a client.

FreeBSD derivatives

Like most operating systems with a long history, FreeBSD has generated its fair share of offspring. It is possible to start a FreeBSD system from a CD without having to compile and produce a CD. The work has already been done with the fairly mature Free System Burned in Economy (FreeSBIE) V1.1 LiveCD system, which in turn is based on FreeBSD V5.3. If allocating part of the hard disk and writing to the master boot record (MBR) seems risky, it is a perfect starting point to begin testing FreeBSD.

DragonFly BSD is based on the FreeBSD V4.x series release, but it does not aim at the average user at all. It mentions secure Internet-wide clustered file systems on the first page of its Web site -- not a requirement likely to trouble first-time UNIX users. DragonFly BSD was founded by the resident FreeBSD virtual memory guru and tries to implement a completely new approach to massive secure file system and memory management.

Documentation matters

It is unusual to mention operating system documentation that comes with UNIX systems because such documentation tends to be as unreadable as it is intrinsically interesting and useful. FreeBSD documentation is a great exception to this rule because it does not pay much attention to old-style manual pages or copy the style or organization of UNIX documentation.

FreeBSD documentation is available as a concisely written book, on the Internet and on paper, covering each and every aspect of the system in a pleasant and considered style. It does not presuppose much familiarity with UNIX systems and, indeed, has been used profitably by UNIX neophytes. It does teach the miracle of a simple FreeBSD installation, but it also gives a clear introduction to the whys and wherefores of FreeBSD kernel compilation or securing a FreeBSD installation. It is interesting to see what the documentation omits -- for example, Perl and Apache -- and what it includes -- such as the Berkeley Internet Name Daemon (BIND) and the FreeBSD-specific storage manager Vinum. Vinum implements virtual disk drive management and can cope with RAID 0, RAID 1, and RAID 5.

The administrator's operating system

It is possible to describe FreeBSD as a network administrator's operating system: It's fast, SMP-capable, and well integrated with a large number of networking tools. However, FreeBSD is just as slick and fast when run on laptops, when running office applications, and when running mail clients and databases. Its installation routines are simple enough for a Microsoft® Windows® power user to be comfortable with. It also has a lot to offer to Linux users, simply because in binary-compatible mode, applications native to Linux run without changes. FreeBSD is extremely scalable and runs most applications written for Linux or BSD flavors. Don't assume that FreeBSD is a Swiss army knife among free operating systems, though: It's neither as secure as OpenBSD nor as scalable as a future Open Solaris version can be safely thought to be. But it competes with any operating system -- commercial or free -- on the Intel chip and, in many cases, provides a more stable and scalable platform than any of its nearest competitors.

Tidak ada komentar:

OFB.biz: Open for Business